How can we find the type of pointer? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How can we find the type of pointer?

shantanukshantanuk Posts: 13Member
Hi,
We donot have an idea as to what data type the pointer is pointing to in the code, neither the pointer is a void pointer nor it is a null pointer. How do we determine that to what data type the pointer is pointing to?
_shantanuk.

Comments

  • gautamgautam Posts: 642Member
    : Hi,
    : We donot have an idea as to what data type the pointer is pointing to in the code, neither the pointer is a void pointer nor it is a null pointer. How do we determine that to what data type the pointer is pointing to?
    : _shantanuk.
    :

    Well you could use typeid to get some information --->

    typeid(pointer_variable).name()
Sign In or Register to comment.