GCC: Array type has incomplete element type

It’s the array that’s causing trouble in: The second and subsequent dimensions must be given: Or you can just give a pointer to pointer: However, although they look similar, those are very different internally. If you’re using C99, you can use variably-qualified arrays. Quoting an example from the C99 standard (section §6.7.5.2 Array Declarators): Question … Read more

When does an Incomplete Type error occur in C++

This happens usually when the compiler has seen a forward declaration but no full definition of this type, while the type is being used somewhere. For example: The second line will cause a compiler error and, depending on the compiler, will report an incomplete type (other compilers give you a different error, but the meaning … Read more