Tuesday, November 16, 2010

Type void

This compiles: int func2(void *v) {return 0;} This does not compile: int func1(void v) {return 0;}

You're not allowed declare an object to be of void type. But you can declare something to be a pointer to void.

No comments:

Post a Comment