Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 683 Bytes

compiler-error-c2032.md

File metadata and controls

33 lines (27 loc) · 683 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2032
Compiler Error C2032
11/04/2016
C2032
C2032
625d7c83-70b6-42c2-a558-81fbc0026324

Compiler Error C2032

'identifier' : function cannot be member of struct/union 'structorunion'

The structure or union has a member function, which is allowed in C++ but not in C. To resolve the error, either compile as a C++ program or remove the member function.

The following sample generates C2032:

// C2032.c
struct z {
   int i;
   void func();   // C2032
};

Possible resolution:

// C2032b.c
// compile with: /c
struct z {
   int i;
};