Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クラス階層があり、オブジェクトが指している実際の型を特定したい場合、答えはオブジェクトのサブクラスだけですか? オブジェクトが抽象クラスである場合でも、そのオブジェクトの明らかなポインタを宣言できますか?実際の型はそのオブジェクトですか?
実行時にオブジェクト (派生またはベース) の型を調べたい場合は、RTTI typeid 演算子を使用して行うことができます。