Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<char> vec(26);
  vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
  char C;
  cin >> C;
  for(int i=0;i<25;i++){
    if(C==vec.at(i))
      cout << vec.at(i+1) << endl;
    break;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |        ^
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |          ^
a.cc:6:12: error: 'c' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |            ^
a.cc:6:14: error: 'd' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |              ^
a.cc:6:16: error: 'e' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                ^
a.cc:6:18: error: 'f' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                  ^
a.cc:6:20: error: 'g' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                    ^
a.cc:6:22: error: 'h' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                      ^
a.cc:6:24: error: 'i' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                        ^
a.cc:6:26: error: 'j' was not declared in this scope; did you mean 'jn'?
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                          ^
      |                          jn
a.cc:6:28: error: 'k' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                            ^
a.cc:6:30: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                              ^
      |                              tm
a.cc:6:32: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                ^
      |                                yn
a.cc:6:34: error: 'l' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                  ^
a.cc:6:36: error: 'o' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                    ^
a.cc:6:38: error: 'p' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                      ^
a.cc:6:40: error: 'q' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                        ^
a.cc:6:42: error: 'r' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                          ^
a.cc:6:44: error: 's' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                            ^
a.cc:6:46: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                              ^
      |                                              tm
a.cc:6:48: error: 'u' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                ^
a.cc:6:50: error: 'v' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                  ^
a.cc:6:52: error: 'w' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                    ^
a.cc:6:54: error: 'x' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                      ^
a.cc:6:56: error: 'y' was not declared in this scope; did you mean 'yn'?
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                        ^
      |                                                        yn
a.cc:6:58: error: 'z' was not declared in this scope
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                          ^
a.cc:6:59: error: no match for 'operator=' (operand types are 'std::vector<char>' and '<brace-enclosed initializer list>')
    6 |   vec={a,b,c,d,e,f,g,h,i,j,k,m,n,l,o,p,q,r,s,t,u,v,w,x,y,z}
      |                                                           ^
In file included from /usr/include/c++/14/vector:72,
                 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/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<char>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<char>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: '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)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<char>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:8:10: error: 'C' was not declared in this scope
    8 |   cin >> C;
      |          ^