Replace substring with another substring C++
<p>How could I replace a substring in a string with another substring in C++, what functions could I use? </p>

<pre><code>eg: string test = "abc def abc def";
test.replace("abc", "hij").replace("def, "klm"); //replace occurrence of abc and def with other substring
</code></pre>
