C++中判斷數據類型的函數

如變量int  a;函數 咱們能夠利用庫函數typeid,來判斷變量a是否爲整型變量;spa  如:變量 if (typeid(a) == typeid(int))文件   這個庫函數typeid在頭文件typeinfo.h中。co #include <typeinfo.h>
相關文章
相關標籤/搜索