Compiler Error C2860

'void' cannot be an argument type, except for '(void)'

Type void cannot be used as an argument type in an argument declaration list except when it appears by itself, meaning an empty argument list.

The following example shows uses of void as an argument type that cause an error:

void profunc1(void, int i);    // error C2860
void profunc2(int i, void);    // error C2860
void profunc3(int, void);      // error C2860
void profunc4(void, ...);      // error C2860
void profunc5(..., void);      // causes syntax error C2059
void func6(int i, void) {}     // error C2860
void func7(int, void) {}       // error C2860
void func8(void, ...) {}       // error C2860
void func9(..., void) {}       // causes syntax error C2059
void func10(void) {}           // OK