i wanna make a program that reads the text (no problemo here)
but how do you can make the program uses newlines?
example:
txt file:
this is a test
test
when i run my program to read it:
this is a test test
it must be:
this is a test
test
i wanna make a program that reads the text (no problemo here)
but how do you can make the program uses newlines?
example:
txt file:
this is a test
test
when i run my program to read it:
this is a test test
it must be:
this is a test
test
How are you reading the file?
If you are using getline, it will stop at the newline character. So simply display the text you read, then cout << endl;
i use istream