Language: C++

#include<iostream>
#include<map>
#include<cmath>
using namespace std;
int main()
{
  map<const char, int> M;
  int k;
  int a,b,c,d,e;
  string S = "abcde";
  cin >> a;
  cin >> b;
  cin >> c;
  cin >> d;
  cin >> e;
  M["a"] = a;
  M["b"] = b;
  M["c"] = c;
  M["d"] = d;
  M["e"] = e;
  for(char key : S){
    for(char  key_t : S){
      if(abs(M[key] - M[key_t]) > k){
        cout << ":(" << endl;
        break;
      }
    }
  }
  cout << "Yay!" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: invalid conversion from 'const char*' to 'std::map<const char, int>::key_type' {aka 'char'} [-fpermissive]
   16 |   M["a"] = a;
      |     ^~~
      |     |
      |     const char*
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:524:29: note:   initializing argument 1 of 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = const char; _Tp = int; _Compare = std::less<const char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = const char]'
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:17:5: error: invalid conversion from 'const char*' to 'std::map<const char, int>::key_type' {aka 'char'} [-fpermissive]
   17 |   M["b"] = b;
      |     ^~~
      |     |
      |     const char*
/usr/include/c++/14/bits/stl_map.h:524:29: note:   initializing argument 1 of 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = const char; _Tp = int; _Compare = std::less<const char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = const char]'
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:18:5: error: invalid conversion from 'const char*' to 'std::map<const char, int>::key_type' {aka 'char'} [-fpermissive]
   18 |   M["c"] = c;
      |     ^~~
      |     |
      |     const char*
/usr/include/c++/14/bits/stl_map.h:524:29: note:   initializing argument 1 of 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = const char; _Tp = int; _Compare = std::less<const char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = const char]'
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:19:5: error: invalid conversion from 'const char*' to 'std::map<const char, int>::key_type' {aka 'char'} [-fpermissive]
   19 |   M["d"] = d;
      |     ^~~
      |     |
      |     const char*
/usr/include/c++/14/bits/stl_map.h:524:29: note:   initializing argument 1 of 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = const char; _Tp = int; _Compare = std::less<const char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = const char]'
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:20:5: error: invalid conversion from 'const char*' to 'std::map<const char, int>::key_type' {aka 'char'} [-fpermissive]
   20 |   M["e"] = e;
      |     ^~~
      |     |
      |     const char*
/usr/include/c++/14/bits/stl_map.h:524:29: note:   initializing argument 1 of 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = const char; _Tp = int; _Compare = std::less<const char>; _Alloc = std::allocator<std::pair<const char, int> >; mapped_type = int; key_type = const char]'
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~