Compiler Error C2120
Visual Studio 2015
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 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: