Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
I know I can do it, and one of my previous teachers (the only one who actually taught me something) always told me to avoid it, since it leads to bad programming habits (like returning in the middle of the function)
So your research has returned void? Sorry I'll see myself out...
Basically it means "nothing" or "no type"
There are 3 basic ways that void is used:
Function argument: int myFunc(void) -- the function takes nothing.
Function return value: void myFunc(int) -- the function returns nothing
Generic data pointer: void* data -- 'data' is a pointer to data of unknown type, and cannot be dereferenced
Note: the void in a function argument is optional in C++, so int myFunc() is exactly the same as int myFunc(void), and it is left out completely in C#. It is always required for a return value.
EDIT: SO to the rescue.
It's standard, but not necessary. It marks the end of a function much like
// End of dick sucking function