This documentation is archived and is not being maintained.

Compiler Error C2334

Error Message

unexpected token(s) preceding ': or {'; skipping apparent function body

This error occurs after another error, for member functions defined inside their class.

The following sample generates C2334:

// C2334.cpp
// compile with: /c
struct s1 {
   s1( {}   // C2334
   s1() {}   // OK