Jan 13th, 2007, 5:25 AM
|
#7
|
|
Programmer
Join Date: May 2006
Location: Cambridge, UK
Posts: 62
Rep Power: 3 
|
Quote:
Originally Posted by Bench
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)
|
|
|