Language: C++

#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    map<string, string> mp{
        {"Sunny" : "Cloudy"},
        {"Cloudy" : "Rainy"},
        {"Rainy" : "Sunny"},
    };
    string input;
    cin >> input;
    cout << mp[input] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected '}' before ':' token
   13 |         {"Sunny" : "Cloudy"},
      |         ~        ^
a.cc:13:18: error: expected '}' before ':' token
a.cc:12:27: note: to match this '{'
   12 |     map<string, string> mp{
      |                           ^
a.cc:13:18: error: no matching function for call to 'std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >::map(<brace-enclosed initializer list>)'
   13 |         {"Sunny" : "Cloudy"},
      |                  ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:302:9: note: candidate: 'template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const _Compare&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  302 |         map(_InputIterator __first, _InputIterator __last,
      |         ^~~
/usr/include/c++/14/bits/stl_map.h:302:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:285:9: note: candidate: 'template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  285 |         map(_InputIterator __first, _InputIterator __last)
      |         ^~~
/usr/include/c++/14/bits/stl_map.h:285:9: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:268:9: note: candidate: 'template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  268 |         map(_InputIterator __first, _InputIterator __last,
      |         ^~~
/usr/include/c++/14/bits/stl_map.h:268:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:262:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  262 |       map(initializer_list<value_type> __l, const allocator_type& __a)
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:262:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:256:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; std::__type_identity_t<_Alloc> = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  256 |       map(map&& __m, const __type_identity_t<allocator_type>& __a)
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:256:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:252:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; std::__type_identity_t<_Alloc> = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  252 |       map(const map& __m, const __type_identity_t<allocator_type>& __a)
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:252:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_map.h:248:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  248 |       map(const allocator_type& __a)
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:248:33: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >::allocator_type&' {aka 'const std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&'}
  248 |       map(const allocator_type& __a)
      |           ~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:240:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const _Compare&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  240 |       map(initializer_list<value_type> __l,
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:240:40: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >'
  240 |       map(initializer_list<value_type> __l,
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:227:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  227 |       map(map&&) = default;
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:227:11: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&&'
  227 |       map(map&&) = default;
      |           ^~~~~
/usr/include/c++/14/bits/stl_map.h:219:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  219 |       map(const map&) = default;
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:219:11: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&'
  219 |       map(const map&) = default;
      |           ^~~~~~~~~~
/usr/include/c++/14/bits/stl_map.h:206:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map(const _Compare&, const allocator_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >; allocator_type = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  206 |       map(const _Compare& __comp,
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:206:27: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::less<std::__cxx11::basic_string<char> >&'
  206 |       map(const _Compare& __comp,
      |           ~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_map.h:197:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key = std::__cxx11::basic_string<char>; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >]'
  197 |       map() = default;
      |       ^~~
/usr/include/c++/14/bits/stl_map.h:197:7: note:   candidate expects 0 arguments, 1 provided
a.cc:13:18: error: expected ',' or ';' before ':' token
   13 |         {"Sunny" : "Cloudy"},
      |                  ^
a.cc: At global scope:
a.cc:13:29: error: mixing declarations and function-definitions is forbidden
   13 |         {"Sunny" : "Cloudy"},
      |                             ^
a.cc:14:9: error: expected unqualified-id before '{' token
   14 |         {"Cloudy" : "Rainy"},
      |         ^
a.cc:14:29: error: expected unqualified-id before ',' token
   14 |         {"Cloudy" : "Rainy"},
      |                             ^
a.cc:15:9: error: expected unqualified-id before '{' token
   15 |         {"Rainy" : "Sunny"},
      |         ^
a.cc:1