I have a string, Five. I wonder if it is possible to insert a blancspace " "
so the string will look like this instead:
"Hello 5Hello"
When I use the code, the application get stuck so I have to force to end the program with the taskmanager.
Code:std::string BigLine = "Hello5Hello"; std::string Five= "5"; std::string::size_type pos; while(std::string::npos != (pos = BigLine.find(Five))) { BigLine.insert(pos, " "); }