Hi,I want to ask how it is possible to read a file without printing newlines?
I'm using getline() to read the strings but I want to print all the strings consecutively even if they've been seperated in the file with a new line.
hg_fs2002
13
Light Poster
Recommended Answers
Jump to Postgetline() does not add the new line character to the end of the string, so if you display the string don't add endl or '\n' after it.
Jump to PostThis is one way to print only 80 characters on a line. I'm sure it could be better optimized, but I just don't feel like taking the time to do it. And it does not do word wrap like an editor would do, then 80 characters is met it just …
All 5 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
hg_fs2002
13
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
mrnutty
761
Senior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.