to_string C++ typeid().name()看对象类型
 
#include<iostream>
#include <typeinfo>
#include <string>
using namespace std;
int main() {
	int a = 10;
	string s=to_string(a);
	string s1 = "12ppp";
	cout << s1 + s << endl;
	cout << typeid(a).name() << endl;
	cout << typeid(s).name() << endl;
	system("pause");
	return 0;
}
 
                    
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号