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