Vector-Erase

  • + 0 comments

    // Can anyone help to find out the mistake

    include

    include

    include

    include

    include

    using namespace std;

    int main() { vector v; int n,value; cin>>n; for(int i=0;i>value; v.push_back(value); } v.erase(v.begin()+1); v.erase(v.begin()+1,v.begin()+3);

    for(int i=0;i<3;i++)
    {
        cout<<v[i]<<" ";
    }
    return 0;
    

    }