Hi!
I am relatively new to C++ and am having problems understanding struct.
I have a struct declared as follow
struct MyNode {
int level;
int index;
MyNode children[4];
}
However the code fails to compile and reports error C2148: total size of array must not exceed 0x7fffffff bytes.
But the following code compiles
struct MyNode {
int level;
int index;
MyNode* children;
}
Can i code MyNode as in the first example or is there something that I am missing.
Thanks!