Console app: Making pretty text blocks
I apologize for not being able to find the answer to this question by myself...but as you can see, I am pretty much a C++ noob.
To practice some C++ I am writing a VERY simple text adventure using beginner-level code and I have quickly found that formatting the text on the screen using cout, \n, and endl is annoyingly cumbersome. The result I want is for lines to be left justified (easily done) and rationally broken at the right of the screen and continued on the next line.
This seems like such a common task that I reckoned it must be a problem tackled frequently with fairly standard functions, or by some other common coding practice...if anyone could tell me (or point me to a resource) how this is done, that would be great! I also realize that I may need to write a function (is parser the correct term?) to break long strings in this way. I know that seems like a simple task for a lot of you, but I wanted to get some answers before I waste my time reinventing the wheel! Of course, since this is a simple text adventure, part of the complication is that certain words in the strings may be char or numeric variables so it seems sensible to do the formatting on-the-fly.
Again, your answer might just be to point me to the standard library where the functions or manipulators or whatever exist that can help me on my way. Many MANY thanks for your help in advance!