Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
We recommend using Visual Studio 2017

Compiler Error C2120

 

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

void' illegal with all types

The void type is used in a declaration with another type.

The following sample generates C2120:

// C2120.cpp  
int main() {  
   void int i;   // C2120  
   int j;   // OK  
}  

Show: