Skip to main content

All Questions

1 vote
2 answers
2k views

C++ Getting neighbours of a cell in a grid, -1x throwing null exception when checked if != NULL

recently moved from C# to C++ so I'm new to pointers and references and so on. I've a pointer-to-pointer array declared like this enum Type { Void, DeepWater, Water, ... etc } Tile::...
Anthony's user avatar
  • 301
0 votes
2 answers
2k views

Pointer to pointer Array

I am trying to make an 'int** arr[5]' the each cell in it contains an 'int* array', each 'int* array' has a different size. Whenever i am trying to print one of the cell it prints only the first ...
Yazen Vid's user avatar
0 votes
1 answer
189 views

Passing pointer-to-char in function: syntax error

My question is related to my previous post: explicit specialization: syntax error? I am trying to pass arrays of pointer-to-chars as an argument to a function (which I will later incorporate to a ...
mi5tch's user avatar
  • 1
1 vote
2 answers
56 views

What value does a pointer to pointer get assigned when points to a dynamically allocated memory?

Consider the following case: int **my_array = new int*[10]; What do we assign to my_array here? my_array is a pointer that points to what? Is there any way to iterate through my_array (the pointer) ...
user5241471's user avatar