fork(5) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cout << "bool = " << typeid(bool).name() << endl;
  7. cout << "char = " << typeid(char).name() << endl;
  8. cout << "unsigned char = " << typeid(unsigned char).name() << endl;
  9. cout << "short = " << typeid(short).name() << endl;
  10. cout << "unsigned short = " << typeid(unsigned short).name() << endl;
  11. cout << "int = " << typeid(int).name() << endl;
  12. cout << "unsigned int = " << typeid(unsigned int).name() << endl;
  13. cout << "long = " << typeid(long).name() << endl;
  14. cout << "unsigned long = " << typeid(unsigned long).name() << endl;
  15. cout << "long long = " << typeid(long long).name() << endl;
  16. cout << "unsigned long long = " << typeid(unsigned long long).name() << endl;
  17. cout << "float = " << typeid(float).name() << endl;
  18. cout << "double = " << typeid(double).name() << endl;
  19. cout << "long double = " << typeid(long double).name() << endl;
  20. cout << "string = " << typeid(string).name() << endl;
  21. cout << "int[] = " << typeid(int[]).name() << endl;
  22. cout << "double[] = " << typeid(double[]).name() << endl;
  23. cout << "vector<int> = " << typeid(vector<int>).name() << endl;
  24. cout << "set<int> = " << typeid(set<int>).name() << endl;
  25. cout << "pair<int, int> = " << typeid(pair<int, int>).name() << endl;
  26. cout << "map<int, int> = " << typeid(map<int, int>).name() << endl;
  27. cout << "stack<int> = " << typeid(stack<int>).name() << endl;
  28. cout << "queue<int> = " << typeid(queue<int>).name() << endl;
  29. cout << "deque<int> = " << typeid(deque<int>).name() << endl;
  30. cout << "priority_queue<int> = " << typeid(priority_queue<int>).name() << endl;
  31. cout << "tuple<int, int, int, int> = " << typeid(tuple<int, int, int, int>).name() << endl;
  32. cout << "map< pair<int, int>, vector< priority_queue<int> > > = " << typeid(map< pair<int, int>, vector< priority_queue<int> > >).name() << endl;
  33.  
  34. return 0;
  35. }
  36.  
Success #stdin #stdout 0s 3100KB
stdin
Standard input is empty
stdout
bool = b
char = c
unsigned char = h
short = s
unsigned short = t
int = i
unsigned int = j
long = l
unsigned long = m
long long = x
unsigned long long = y
float = f
double = d
long double = e
string = Ss
int[] = A_i
double[] = A_d
vector<int> = St6vectorIiSaIiEE
set<int> = St3setIiSt4lessIiESaIiEE
pair<int, int> = St4pairIiiE
map<int, int> = St3mapIiiSt4lessIiESaISt4pairIKiiEEE
stack<int> = St5stackIiSt5dequeIiSaIiEEE
queue<int> = St5queueIiSt5dequeIiSaIiEEE
deque<int> = St5dequeIiSaIiEE
priority_queue<int> = St14priority_queueIiSt6vectorIiSaIiEESt4lessIiEE
tuple<int, int, int, int> = St5tupleIIiiiiEE
map< pair<int, int>, vector< priority_queue<int> > > = St3mapISt4pairIiiESt6vectorISt14priority_queueIiS2_IiSaIiEESt4lessIiEESaIS8_EES6_IS1_ESaIS0_IKS1_SA_EEE