When you say name of the object, do you mean name of the class for which the object is an instance of?
the typeid operator returns an object of the type_info class. This class has a member function called name which will return the types name, hence you could try:
The type_info class also has the comparison operators == and !=
graeme.