クラスおよび/またはそのサブクラス (myClass など) を string/int/whatever にマップすることはまったく可能ですか?
これは私が考えていることです:
map<myClass, string> myMap = {
    {subclass1, "one"},
    {subclass2, "two"}
    //etc etc
}
動作するサンプル コードのコンパイルに問題があります。それを手伝ってもらえますか?
注:私はc++ 11を使用しています
そのために使用できますstd::type_index:
#include <map>
#include <string>
#include <typeindex>
std::map<std::type_index, std::string> m { { typeid(myClass), "zero" }
                                         , { typeid(subclass1), "one" }
                                         , { typeid(subclass2), "two" }
                                         };