Hi,
I'm having trouble with inserting new line into a string. I must change every "." character in a string for a new line.
I have tried many ways. One of them was this:
Probably is a very easy thing for most of you, but I just can find a solution.
I'm having trouble with inserting new line into a string. I must change every "." character in a string for a new line.
I have tried many ways. One of them was this:
for (int i = 0; i < textLength; i++) { if (allText.at(i) == '.') { allText.erase(i, 1); allText.insert(i, "\n"); textLength++; } }
Probably is a very easy thing for most of you, but I just can find a solution.