Mega Code Archive

 
Categories / C++ Tutorial / String
 

Delete characters from the string given position and count

#include <string> #include <algorithm> #include <iostream> using namespace std; int main () {     string strSample ("Hello String! Wake up to a beautiful day!");     strSample.erase (13, 28);     cout << strSample;     return 0; }