Compiler Error C2199


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

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

syntax error : found 'identifier (' at global scope (was a declaration intended?)

The specified context caused a syntax error. There may be incorrect declaration syntax.

The following sample generates C2199:

// C2199.cpp  
// compile with: /c  
int j = int(1) int(1);   // C2199  
int j = 1;   // OK