class Test { int count string name; }; Test objTest
코드상에서 object 를 가지고 object 의 타입이름이 무었인지 알려면 어떻게 해야 하나요?
위의 class 를 사용한다면 objTest 객체를 가지고 "Test" 를 출력하고 싶습니다.
아시는 분의 조언을 부탁드립니다.
#include <typeinfo> cout < < typeid(obj).name() < < endl;
from, http://stackoverflow.com/questions/1024648/retrieving-a-c-class-name-programatically
#include <typeinfo>cout <<
from, http://stackoverflow.com/questions/1024648/retrieving-a-c-class-name-programatically