Following scenario:
int** pToPField = new int* [8];
Now I have a pointer pointing to a field of pointers. Each pointing to an int, right?
Now I want to assign the first two int fields like:
*(*(pToPField)) = 1;
*(*(pToPField + 1)) = 2;
Or like:
*(pToPField[0]) = 1;
*(pToPfield[1]) = 2;
The error is always a core dump. Is my syntax that wrong? I tried to figure it out from the first answer to this question: How do I use arrays in C++? I had no luck.
Regards