|
|
pchar= (char*)data
← converting data variable to the type char* (pointer to char)pchar = char*data
← completely invalid. It would mean "multiply char and data variables" if it wasnt forbidden to use reserved words as variable names
pchar= (char*)data;
is casting (i.e. converting type) by using the C's cast syntax. C++ has a more finetuned syntax. See http://www.cplusplus.com/doc/tutorial/typecasting/