Export (0) Print
Expand All
Expand Minimize

Compiler Error C2036

Error Message

'identifier' : unknown size

An operation on identifier requires the size of the data object, which cannot be determined.

Example

The following sample generates C2036.

// C2036.c
// a C program
struct A* pA;
struct B { int i; } *pB;
int main() {
   pA++;   // C2036, size of A not known
   ((char*)pA)++;   // OK

   pB++;   // OK
}

The following sample generates C2036.

// C2036_2.cpp
// a C++ program
struct A* pA;
int main() {
   pA++;   // C2036, size of A not known
   ((char*&)pA)++;   // OK, if sizeof(A) == sizeof(char)
}

Community Additions

ADD
Show:
© 2014 Microsoft