C++ example:
#include <typeinfo>#include <iostream>int main() {int nInt;char cChar;std::cout<<"nInt type = " << typeid(nInt).name() <<std::endl;std::cout<<"cChar type = " << typeid(cChar).name() <<std::endl;return 0;}if you define #include <typeinfo>, you can know type info of the variant.
No comments:
Post a Comment