You're wrong
void means that there are NO arguments, while nothing in the parameter list means, in C only, any number of arguments. In C++, an empty argument list and a void argument list are the same.
You're wrong
void means that there are NO arguments, while nothing in the parameter list means, in C only, any number of arguments. In C++, an empty argument list and a void argument list are the same.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
is this legal ?
if it is, what does it mean ?Code:void variable1;
blow me ... ...
Thanks for correcting me there. I knew it was specific to C but was confusing an empty list with a void list of parameters. Pulled it off the back of my brain which thanks to CornedBee has been revealed to be defective. Can I get a trade in?
I don't think
void variable is legal but
void * variable is
again I could be wrong.
Last edited by curlious; 09-24-2004 at 06:39 AM.
void variable1;
is not valid. Why? Because it would have no meaning. You can't have a variable of no type.
void *ptr1;
is valid though. The variable has the type "memory address without any information as to what might be at that address."
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law