diff --git a/algorithms/CPlusPlus/Sorting/Vector-Erase.cpp b/algorithms/CPlusPlus/Sorting/Vector-Erase.cpp new file mode 100644 index 00000000..bbdbf42b --- /dev/null +++ b/algorithms/CPlusPlus/Sorting/Vector-Erase.cpp @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include +using namespace std; + + +int main() { + int size,pos,start,end,n,i,a,j; + cin>>n; + vectorv; + for(i=0;i>a; + v.push_back(a); + } + cin>>pos>>start>>end; + v.erase(v.begin()+(pos-1)); + v.erase(v.begin()+start-1,v.begin()+end-1); + size=v.size(); + cout<