Compiler Error C2736


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 C2736.

keyword' keyword is not permitted in cast

The keyword is invalid in a cast.

The following sample generates C2736:

// C2736.cpp  
int main() {  
   return (virtual) 0;   // C2736  
   // try the following line instead  
   // return 0;