/in/foo.cc:3:1: error: 'map' does not name a type
map<string,int> q;
^~~
/in/foo.cc:5:1: error: 'string' does not name a type; did you mean 'stdin'?
string a,c;
^~~~~~
stdin
/in/foo.cc: In function 'int main()':
/in/foo.cc:9:2: error: 'cin' was not declared in this scope
cin>>n;
^~~
/in/foo.cc:9:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
from /in/foo.cc:1:
/usr/include/c++/7/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
/in/foo.cc:12:8: error: 'a' was not declared in this scope
cin>>a>>b;
^
/in/foo.cc:13:3: error: 'q' was not declared in this scope
q[a]+=b;
^
/in/foo.cc:17:4: error: 'c' was not declared in this scope
c=a;
^
/in/foo.cc:21:2: error: 'cout' was not declared in this scope
cout<<c<<endl;
^~~~
/in/foo.cc:21:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
from /in/foo.cc:1:
/usr/include/c++/7/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
/in/foo.cc:21:8: error: 'c' was not declared in this scope
cout<<c<<endl;
^
/in/foo.cc:21:11: error: 'endl' was not declared in this scope
cout<<c<<endl;
^~~~
/in/foo.cc:21:11: note: suggested alternative:
In file included from /usr/include/c++/7/istream:39:0,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/7/ostream:590:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~