C++之typedef的用法
#include <iostream>
namespace std;
typedef int new_int;
new_int a =2;
const type_info &a_type = typeid(a);
int main(){
cout<<a<<endl
<<a_type<<endl;
return 0;
}
输出:2
i
#include <iostream>
namespace std;
typedef int new_int;
new_int a =2;
const type_info &a_type = typeid(a);
int main(){
cout<<a<<endl
<<a_type<<endl;
return 0;
}
输出:2
i