I\'m trying to declare a C++ variable that takes up zero bytes. Its in a union, and I started with the type as int[0]. I don\'t know if that is actually zero bytes (although
The typedef is misspelled:
typedef int nullType[0];
As others have pointed out, you cannot have an object of size 0; However, compilers can (and frequently do) provide the Empty Base Class optimization.