Language: C++

#include<iostream>
#include<map>

int main(){
	map<string,int> mp;
  	mp.insert({"SUN",7});
    mp.insert({"MON",6});
  	mp.insert({"TUE",5});
  	mp.insert({"WED",4});
  	mp.insert({"THU",3});
  	mp.insert({"FRI",2});
    mp.insert({"SAT",1});
  	string str;
  	while(cin>>str){
    	cout<<mp[str]<<endl;
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'map' was not declared in this scope
    5 |         map<string,int> mp;
      |         ^~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:5:13: error: 'string' was not declared in this scope
    5 |         map<string,int> mp;
      |             ^~~~~~
a.cc:5:13: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:20: error: expected primary-expression before 'int'
    5 |         map<string,int> mp;
      |                    ^~~
a.cc:6:9: error: 'mp' was not declared in this scope
    6 |         mp.insert({"SUN",7});
      |         ^~
a.cc:13:15: error: expected ';' before 'str'
   13 |         string str;
      |               ^~~~
      |               ;
a.cc:14:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 |         while(cin>>str){
      |               ^~~
      |               std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:20: error: 'str' was not declared in this scope; did you mean 'std'?
   14 |         while(cin>>str){
      |                    ^~~
      |                    std
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout<<mp[str]<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |         cout<<mp[str]<<endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~