What does void mean in C, C++, and C#? -
Where the word VoID comes from and why it will be called zero but want to get the basic principle, the purpose of the question is to assist the person There is no experience, and it is suddenly watching the C-based codebase.
In fact it means "nothing" or "no type"
3 basic ways zero is used:
-
function argument:
int myFunc (zero)
-function takes nothing without -
Function Return value:
zero myFunc (int)
- No return of function -
Generic Data Pointer :
Zero * Data - 'Data' is an indicator for unknown type of data, and it is not dereferenced
Note: In the function argument,
zero
is optional C ++, henceint myFunc ()
by the way The same is the same asint myFunc (zero)
, and it is left entirely in C #. It is always necessary for a return value.
Comments
Post a Comment