fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. auto x= 5.7;
  6. cout<< typeid(x).name();
  7.  
  8. return 0;
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:16: error: must #include <typeinfo> before using typeid
  cout<< typeid(x).name();
                ^
stdout
Standard output is empty