#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string a;
cin>>a;
a.erase(a.end()-1);
a.erase(a.begin()+1);
string ge = "oae";
a.insert(a.begin()+1, ge);
cout<<a<<endl;
return 0;
}
It doesn’t compile and i don’t know why. Can you tell me what’s wrong
http://www.cplusplus.com/reference/string/string/insert/
Your call to
std::basic_string<t>::insertdoes not match any of the above overloads.needs to be
or
Otherwise that code is not valid.