Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 int N;
 string S;
 cin>>N>>S;
 vector<char>ABC(26);
 ABC={
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
 };
 int a=S.size();
vector<int>answer(a);
for(int  i=0; i<a; i++){
for(int j=0; i<25;){
if(S.at(i)==ABC.at(j{
answer.at(i)==j;
continue;
}
}
}
for(int i=0; i<a; i++){
answer.at(i)+=N;
if(answer.at(i)>26){
answer.at(i)-=26;
}
cout<<ABC.at(answer.at(i));
}
cout<<""<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      | ^~~
      | |
      | const char*
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:5: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |     ^~~
      |     |
      |     const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |         ^~~
      |         |
      |         const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |             ^~~
      |             |
      |             const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:17: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                 ^~~
      |                 |
      |                 const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:21: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                     ^~~
      |                     |
      |                     const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                         ^~~
      |                         |
      |                         const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:29: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                             ^~~
      |                             |
      |                             const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:33: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                 ^~~
      |                                 |
      |                                 const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:37: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                     ^~~
      |                                     |
      |                                     const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:41: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                         ^~~
      |                                         |
      |                                         const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:45: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                             ^~~
      |                                             |
      |                                             const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:49: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                                 ^~~
      |                                                 |
      |                                                 const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:53: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                                     ^~~
      |                                                     |
      |                                                     const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:57: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
      |                                                         ^~~
      |                                                         |
      |                                                         const char*
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   initializing argument 1 of 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = char; _Alloc = std::allocator<char>]'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:61: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 | "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q