I\'m making a virtual machine in C++ and I\'ve run into this error,
error: field has incomplete type \'int []\'
int instrarr[];
I have a
It's pretty simple, int[]
is an incomplete type, as it lacks information about how large it is. In function call parameters, it goes synonymous with declaring a pointer instead of an array, but for defintions, as in your code, the compiler certainly needs to know how large the array is, in order to allocate storage for it.