string&string::erase () cpp output: Before erase() : Hello World!After erase() : Syntax 2:Erases all characters after position ‘pos’ string&string::erase (size_type pos)- Throw out_of_rangeifidx > size(). cpp output: Before erase(idx) : Hello World! After erase(idx) : H ...