Hi,
I'm using QtCreator to debug a program. I have an issue with the display of pointers when using QtCreator to debug a program.
I simplified my program to this:
#include <QCoreApplication>
#include <stdio.h>
int main(int argc, char *argv[])
{
QCoreApp a(argc, argv);
int **parray = new int *[5];
printf("parray is %p\n",parray);
for(int i = 0; i < 5; i++)
parray[i] = new int[5];
return a.exec();
}
Now if I put a breakpoint on the line return
a.exec();
the debugger reports parray as having value 0 in the pane where it reports the value of all local variables.
This looks strange as the printf indicates the pointer is not null (as you would expect).
My allocation looks ok, so what is the 0 referring to?
Bookmarks