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 Member Posts: 13
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 Member Posts: 642
    : 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.