Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how can I delete a substring from a string in c++?

string x = "Iron Man";
x.erase(start,length);
cout << x;
// start represent from which position we try to delete
// length rerensent the length we try to delete from the start position.
 
PREVIOUS NEXT
Tagged: #I #delete #substring #string
ADD COMMENT
Topic
Name
2+8 =