Hi i am using eclipse as ide for c++ and have made a program to remove a particular character from a string .
The problem is that when i try to run it ,it ask me for the the character which i want to remove then after i input the character it gives this error
28 [sig] hello1 9168 open_stackdumpfile: Dumping stack trace to hello1.exe.stackdump
When I compiled this, I got a warning that your expression will always be false due to a limited range of your type. I changed it to size_t and the warning went away, however the problem was not resolved.
I debugged your code, it seems that your problem didn't come from what you listed. It actually came from this statement: ns3 = ns3.substr(0, pos) + ns3.substr(pos + 1);
Do you see why? The error is an out_of_bounds error.