Language: C++

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

int main() {
  string s;
  cin >> s;
  for(int i = 0; i<s.size(); i++) {
    if(S.at(i)=="a") {
       "a"="x";
  }
    else if(S.at(i)=="b") {
       "b"="x";
  }
    else if(S.at(i)=="c") {
       "c"="x";
  }
    else if(S.at(i)=="d") {
       "d"="x";
  }
    else if(S.at(i)=="e") {
       "e"="x";
  }
    else if(S.at(i)=="f") {
       "f"="x";
  }
    else if(S.at(i)=="g") {
       "g"="x";
  }
    else if(S.at(i)=="h") {
       "h"="x";
  }
    else if(S.at(i)=="i") {
       "i"="x";
  }
    else if(S.at(i)=="j") {
       "j"="x";
  }
    else if(S.at(i)=="k") {
       "k"="x";
  }
    else if(S.at(i)=="l") {
       "l"="x";
  }
    else if(S.at(i)=="m") {
       "m"="x";
  }
    else if(S.at(i)=="n") {
       "n"="x";
  }
    else if(S.at(i)=="o") {
       "o"="x";
  }
    else if(S.at(i)=="p") {
       "p"="x";
  }
    else if(S.at(i)=="q") {
       "q"="x";
  }
    else if(S.at(i)=="r") {
       "r"="x";
  }
    else if(S.at(i)=="s") {
       "s"="x";
  }
    else if(S.at(i)=="t") {
       "t"="x";
  }
    else if(S.at(i)=="u") {
       "u"="x";
  }
    else if(S.at(i)=="v") {
       "v"="x";
  }
    else if(S.at(i)=="w") {
       "w"="x";
  }
    else if(S.at(i)=="y") {
       "y"="x";
  }
    else if(S.at(i)=="z") {
       "z"="x";
  }
    else {
    }
  cout << s <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'S' was not declared in this scope
    8 |     if(S.at(i)=="a") {
      |        ^
a.cc:9:11: error: assignment of read-only location '"a"'
    9 |        "a"="x";
      |        ~~~^~~~
a.cc:12:11: error: assignment of read-only location '"b"'
   12 |        "b"="x";
      |        ~~~^~~~
a.cc:15:11: error: assignment of read-only location '"c"'
   15 |        "c"="x";
      |        ~~~^~~~
a.cc:18:11: error: assignment of read-only location '"d"'
   18 |        "d"="x";
      |        ~~~^~~~
a.cc:21:11: error: assignment of read-only location '"e"'
   21 |        "e"="x";
      |        ~~~^~~~
a.cc:24:11: error: assignment of read-only location '"f"'
   24 |        "f"="x";
      |        ~~~^~~~
a.cc:27:11: error: assignment of read-only location '"g"'
   27 |        "g"="x";
      |        ~~~^~~~
a.cc:30:11: error: assignment of read-only location '"h"'
   30 |        "h"="x";
      |        ~~~^~~~
a.cc:33:11: error: assignment of read-only location '"i"'
   33 |        "i"="x";
      |        ~~~^~~~
a.cc:36:11: error: assignment of read-only location '"j"'
   36 |        "j"="x";
      |        ~~~^~~~
a.cc:39:11: error: assignment of read-only location '"k"'
   39 |        "k"="x";
      |        ~~~^~~~
a.cc:42:11: error: assignment of read-only location '"l"'
   42 |        "l"="x";
      |        ~~~^~~~
a.cc:45:11: error: assignment of read-only location '"m"'
   45 |        "m"="x";
      |        ~~~^~~~
a.cc:48:11: error: assignment of read-only location '"n"'
   48 |        "n"="x";
      |        ~~~^~~~
a.cc:51:11: error: assignment of read-only location '"o"'
   51 |        "o"="x";
      |        ~~~^~~~
a.cc:54:11: error: assignment of read-only location '"p"'
   54 |        "p"="x";
      |        ~~~^~~~
a.cc:57:11: error: assignment of read-only location '"q"'
   57 |        "q"="x";
      |        ~~~^~~~
a.cc:60:11: error: assignment of read-only location '"r"'
   60 |        "r"="x";
      |        ~~~^~~~
a.cc:63:11: error: assignment of read-only location '"s"'
   63 |        "s"="x";
      |        ~~~^~~~
a.cc:66:11: error: assignment of read-only location '"t"'
   66 |        "t"="x";
      |        ~~~^~~~
a.cc:69:11: error: assignment of read-only location '"u"'
   69 |        "u"="x";
      |        ~~~^~~~
a.cc:72:11: error: assignment of read-only location '"v"'
   72 |        "v"="x";
      |        ~~~^~~~
a.cc:75:11: error: assignment of read-only location '"w"'
   75 |        "w"="x";
      |        ~~~^~~~
a.cc:78:11: error: assignment of read-only location '"y"'
   78 |        "y"="x";
      |        ~~~^~~~
a.cc:81:11: error: assignment of read-only location '"z"'
   81 |        "z"="x";
      |        ~~~^~~~
a.cc:86:2: error: expected '}' at end of input
   86 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^