1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <stdlib.h> #include "foo.h" test* maketestsub() { return new testsub(); } bool istestsub(test* t) { return (dynamic_cast<testsub*>(t) != NULL); }