Viewing a dynamically-allocated array with the Xcode debugger?

后端 未结 4 1758
自闭症患者
自闭症患者 2020-12-23 14:59

Let\'s say I have an array in C++:

double* velocity = new double[100];

Using the GDB command line, I can view this array with the command:<

4条回答
  •  旧巷少年郎
    2020-12-23 15:25

    You can use gdb syntax as expressions:

    1. Use Run/Show/Expressions... menu to show the expressions window
    2. Enter '*velocity @ 100' at the bottom of the window (Expression:)

提交回复
热议问题