Check out example codes for "pop from between string c++". It will help you in understanding the concepts better.

Code Example 1

void eraseDemo(string str) 
{ 
    // Deletes 4 characters from index number 1 
    str.erase(1, 4); 
  
    cout << "After erase : "; 
    cout << str; 
} 
  
// Driver code 
int main() 
{ 
    string str("Hello World!"); 
  
    cout << "Before erase : "; 
    cout << str << endl; 
    eraseDemo(str); 
  
    return 0; 
} 
Output:

Before erase : Hello World!
After erase : H World!

Learn ReactJs, React Native from akashmittal.com