how to get the individual letters of a string and change them c++ code example
Example: replace a char in string c++ at a specific index
string a = "lol";
a[2] = 'j';
cout << a;
//output: loj
string a = "lol";
a[2] = 'j';
cout << a;
//output: loj