c# - what is the practical use of void datatype and void pointer? -
void variable has nothing , void pointer can pointed casting. void pointer used when don't know , of data type want point. of void variable?
any practical example?
in c void can't considered data type, keyword used placeholder in place of data type show there no data.
for example consider function void f(void);. here keyword void used mean absence of parameters passed , returned values.
but void *ptr; different in meaning.
this declares pointer without specifying data type pointing to.
Comments
Post a Comment