So how do you replace part of a string in C++.

Say I have a string:

"The cat is black."

And I want to replace "cat" with "dog"?