F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_36942414_18223.cpp: In function 'int main()':
0_0_36942414_18223.cpp:9:5: error: 'map' was not declared in this scope
     map<string,int>s={{"C",0},{"C#",1},{"D",2},{"D#",3},{"E",4},{"F",5},{"F#",6},{"G",7},{"G#",8},{"A",9},{"A#",10},{"B",11}};
     ^
0_0_36942414_18223.cpp:9:5: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/map:61:0,
                 from 0_0_36942414_18223.cpp:6:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_map.h:96:11: note:   'std::map'
     class map
           ^
0_0_36942414_18223.cpp:9:9: error: 'string' was not declared in this scope
     map<string,int>s={{"C",0},{"C#",1},{"D",2},{"D#",3},{"E",4},{"F",5},{"F#",6},{"G",7},{"G#",8},{"A",9},{"A#",10},{"B",11}};
         ^
0_0_36942414_18223.cpp:9:9: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iosfwd:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_36942414_18223.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stringfwd.h:62:33: note:   'std::string'
   typedef basic_string<char>    string;   
                                 ^
0_0_36942414_18223.cpp:9:16: error: expected primary-expression before 'int'
     map<string,int>s={{"C",0},{"C#",1},{"D",2},{"D#",3},{"E",4},{"F",5},{"F#",6},{"G",7},{"G#",8},{"A",9},{"A#",10},{"B",11}};
                ^
0_0_36942414_18223.cpp:11:12: error: expected ';' before 's1'
     string s1, s2, s3;
            ^
0_0_36942414_18223.cpp:12:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
0_0_36942414_18223.cpp:12:5: note: suggested alternative:
In file included from 0_0_36942414_18223.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
0_0_36942414_18223.cpp:14:14: error: 's1' was not declared in this scope
         cin>>s1>>s2>>s3;
              ^
0_0_36942414_18223.cpp:14:18: error: 's2' was not declared in this scope
         cin>>s1>>s2>>s3;
                  ^
0_0_36942414_18223.cpp:14:22: error: 's3' was not declared in this scope
         cin>>s1>>s2>>s3;
                      ^
0_0_36942414_18223.cpp:15:18: error: 's' was not declared in this scope
         int x1 = s[s1], x2 = s[s2], x3 = s[s3];
                  ^
0_0_36942414_18223.cpp:16:15: error: 'x2' was not declared in this scope
         if(x1>x2)
               ^
0_0_36942414_18223.cpp:18:12: error: 'x2' was not declared in this scope
         if(x2>x3)
            ^
0_0_36942414_18223.cpp:18:15: error: 'x3' was not declared in this scope
         if(x2>x3)
               ^
0_0_36942414_18223.cpp:20:12: error: 'x2' was not declared in this scope
         if(x2 - x1 == 4&&x3 - x2 == 3){
            ^
0_0_36942414_18223.cpp:20:26: error: 'x3' was not declared in this scope
         if(x2 - x1 == 4&&x3 - x2 == 3){
                          ^
0_0_36942414_18223.cpp:21:13: error: 'cout' was not declared in this scope
             cout<<"Major triad"<<endl;
             ^
0_0_36942414_18223.cpp:21:13: note: suggested alternative:
In file included from 0_0_36942414_18223.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_36942414_18223.cpp:21:34: error: 'endl' was not declared in this scope
             cout<<"Major triad"<<endl;
                                  ^
0_0_36942414_18223.cpp:21:34: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39:0,
                 from 0_0_36942414_18223.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:564:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^
0_0_36942414_18223.cpp:24:13: error: 'cout' was not declared in this scope
             cout<<"Minor triad"<<endl;
             ^
0_0_36942414_18223.cpp:24:13: note: suggested alternative:
In file included from 0_0_36942414_18223.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_36942414_18223.cpp:24:34: error: 'endl' was not declared in this scope
             cout<<"Minor triad"<<endl;
                                  ^
0_0_36942414_18223.cpp:24:34: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39:0,
                 from 0_0_36942414_18223.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:564:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^
0_0_36942414_18223.cpp:27:13: error: 'cout' was not declared in this scope
             cout<<"Minor triad"<<endl;
             ^
0_0_36942414_18223.cpp:27:13: note: suggested alternative:
In file included from 0_0_36942414_18223.cpp:1:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
0_0_36942414_18223.cpp:27:34: error: 'endl' was not declared in this scope
             cout<<"Minor triad"<<endl;
                                  ^
0_0_36942414_18223.cpp:27:34: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39:0,
                 from 0_0_36942414_18223.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:564:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-27 04:56:21, Gzip enabled