fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4. #include <vector>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. auto i = 1+1.1;
  11. int arr[10] = {1};
  12. map<int,string> a;
  13. vector<string> b;
  14. b.push_back("aa");
  15. b.push_back("BB");
  16. a.insert(make_pair(1,"!"));
  17. a.insert(make_pair(2,"@"));
  18. a.insert(make_pair(3,"#"));
  19.  
  20. cout<<a[1]<<endl<<i;
  21.  
  22. return 0;
  23. }
  24.  
  25.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:5: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     auto i = 1+1.1;
     ^
prog.cpp:10:10: error: ‘i’ does not name a type
     auto i = 1+1.1;
          ^
prog.cpp:20:23: error: ‘i’ was not declared in this scope
     cout<<a[1]<<endl<<i;
                       ^
prog.cpp:11:9: warning: unused variable ‘arr’ [-Wunused-variable]
     int arr[10] = {1};
         ^
stdout
Standard output is empty