samedi 27 juin 2020

typeid returns strange output [duplicate]

How may I get the class name in C++?

For example inside my class GameException: I tried typeid(GameException).name()); but it print something strange like:

N3mtm13GameExceptionE @

While I expect it to give:

GameException

Aucun commentaire:

Enregistrer un commentaire