Void! Me idjit!
I finally moved on to classes with my C++ programming book, but i guess that the book didn''t fully explain what "void" does! could anyone help me?
522912...Boy is that getting old.
Void is a kind of non-type used when performing certain typeless operations.
Also, when a function doesn''t return a value, it is said to return void, because it literally returns nothing.
Void pointers can be used when passing data to a nonoverloaded function that needs to accept multiple types of data, as in a file i/o function or network send/recv function. Void pointers can be cast to other types of pointers, and vice versa, but you may not, IIRC, dereference a void pointer.
Corrections welcome.
Peace,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Also, when a function doesn''t return a value, it is said to return void, because it literally returns nothing.
Void pointers can be used when passing data to a nonoverloaded function that needs to accept multiple types of data, as in a file i/o function or network send/recv function. Void pointers can be cast to other types of pointers, and vice versa, but you may not, IIRC, dereference a void pointer.
Corrections welcome.
Peace,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[twitter]warrenm[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement