c++ - Why void* and not just void? -


i wondering why can use void pointer unspecified type , not void.like this:

void data;

void* data;

void& data;

so why have pointer , not reference or without of those? hope kinda me! thank you

because void , void* described separately , in standard:

the void type has empty set of values. void type incomplete type cannot completed.

also,

the type of pointer void or pointer object type called object pointer type. [ note: pointer void not have pointer-to-object type, however, because void not object type. —end note ]

and,

an object of type cv void* shall have same representation , alignment requirements cv char*.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -