View Single Post
Old Jan 13th, 2007, 5:25 AM   #7
magnus.therning
Programmer
 
Join Date: May 2006
Location: Cambridge, UK
Posts: 62
Rep Power: 3 magnus.therning is on a distinguished road
Quote:
Originally Posted by Bench View Post
I'd say that this is far more 'C++' ..
    std::string my_string("The quick brown fox jumped over the lazy dog");
    std::replace( my_string.begin(), my_string.end(), 'o', '*' );
Yes, that is a lot better. Thanks!
__________________
Don't comment bad code - rewrite it.
- The Elements of Programming Style (Kernighan & Plaugher)
magnus.therning is offline   Reply With Quote