I am declaring a two dimensional array as such:
char arr[10][10];
arr[0][0] = 'X';
Now I print in debugger;
(lldb) po arr[0][0]
'X'
Awesome!! No problem.
Now I am declaring a two dimensional array as such:
int col = 10;
int row = 10;
char arr[row][col];
arr[0][0] = 'X';
Now I print in debugger;
(lldb) po arr[0][0]
error: subscript of pointer to incomplete type 'char []'
error: 1 errors parsing expression
Why??
The debugger doesn't know exactly how big the array is, so you need to apply a cast:
(gdb) p ((char (*)[10])arr)[0][0]
$2 = 88 'X'