You might create a class, say
Replacer
:
class Replacer
{
std::map<std::string,> replacement;
public:
Replacer()
{
replacement.insert ( std::pair<std::string,std::string>("C#","C++") );
}
void replace_stuff(std::string & a);
}
Then the
replace_stuff
definition would be very similar to your original
ReplaceString
(it would use map entries instead of the passed parameters).