Compiler Error C2473

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2473.

identifier' : looks like a function definition, but there is no parameter list.

The compiler detected what looked like a function, without the parameter list.

The following sample generates C2473.

// C2473.cpp  
// compile with: /clr /c  
class A {  
   int i {}   // C2473  
};  
  
class B {  
   int i() {}   // OK  
};  

Show: