The Red Fox jumped over the Lazy Dog
Could be translated to:
The%20Red%20Fox%20jumped%20over%20the%20Lazy%Dog
How to translate it to:
The_Red_Fox_jumped_over_the_Lazy_Dog?

To make it more eye friendly.

you could use replace function and replace spaces.

Yes, but how to know which character stands for which?
I have heard that < is also ";lt?".
How do I know which characters replace by which?

FOUND: http://www.ascii.cl/htmlcodes.htm

try this function from algorithm header.

string s = SOME_STR;
replace( s.begin(), s.end(), 'x', 'y');