Can I derefernce void pointer ?

Today, some body asked me $subject..

The answer is : NO ..

You should not dereference void pointer before letting the compiler know, to “what” it is pointing.

That said, do type casting to the approprite pointer type  before dereferencing a void pointer

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *