Remove exclamations:
#include <algorithm> #include <iterator> std::string result; std::remove_copy(delStr.begin(), delStr.end(), std::back_inserter(result), '!');
Alternatively, if you want to print a line, you do not need the result variable:
#include <iostream> std::remove_copy(delStr.begin(), delStr.end(), std::ostream_iterator<char>(std::cout), '!');
Replace features with dashes:
std::replace(repStr.begin(), repStr.end(), '/', '-');
Fred foo
source share