What's wrong with the following code ?

Posted by dada on Stack Overflow See other posts from Stack Overflow or by dada
Published on 2010-04-16T21:47:07Z Indexed on 2010/04/16 21:53 UTC
Read the original article Hit count: 244

Filed under:
|
|
#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

© Stack Overflow or respective owner

Related posts about c++

Related posts about string