Hi all:
Can I declare a pointer as:
void *ptr = NULL;
and later use it to point at any type of data?
Cheers
Hi all:
Can I declare a pointer as:
void *ptr = NULL;
and later use it to point at any type of data?
Cheers
Yes, a void * can be used to point to anything. However, bear in mind that _YOU_ will have to know what it points to.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Cheers.
Thank you for your help