Recently learning C + +, write some exercises encountered a lot of trouble, so on Baidu or Bing Google, search out a lot of relevant solutions. Although the search out, but most let me wonder is that I found a lot of people's code is problematic or even wrong, this is the strength of my pit a bit, resulting in my program a lot of bugs.
To be honest, I'm not reaching out to the party, but, for example, the parameters in the Replace method that introduce a simple C + + string are wrong. The result of the program is that a few lines of text, each with the Replace method, the text from the second line beginning a small line. Because I am looping the replacement text, finally, the output is left with two lines of text.
I am a newly learned C + +, do not have to pit me ...
After searching for some of this kind of article, it seems to be more careful.
Questions about the usability of the code in the blog of netizens