search

Home  >  Q&A  >  body text

c++ - Mac下CLion调试C时无法查看动态数组的全部内容

  1. 监视窗口里没有按照数组模式显示,谷歌之某贴(链接1,链接2)说明 maxArray,6 能显示, 然在我平台无效. 但使用 lldb 命令可以查看, 能否设置在变量窗口实时显示数组内容?

  2. 截图如下, 内存地址不一致不要纠结, 图分两次截的

怪我咯怪我咯2786 days ago1272

reply all(1)I'll reply

  • 阿神

    阿神2017-04-17 15:28:55

    Yours cannot be called an array in the first place, it is just a continuous memory space. Your maxArray is just the first address of this space. How does clion know that you want to use this space as an array

    So you still have to abandon naked malloc, you should use std::vector

    reply
    0
  • Cancelreply