Can anybody help me solve this case?
there's an example input and output

Recommended Answers

All 2 Replies

can anyone help me please ...

After a cursory reading, it looks like the problem is to eliminate adjacent whitespace and enable word wrapping. This is clearly a homework assignment, and it's also an instructive exercise in string handling, so we'll require that you make an honest attempt first. If you get stuck, feel free to ask a specific question (in the C++ forum), and someone will give you a little push in the right direction.

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.