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
voidtype has empty set of values. void type incomplete type cannot completed.
also,
the type of pointer
voidor 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 cvchar*.
Comments
Post a Comment