String manipulation is a very important aspect of almost any software. Being able to manipulate strings simply and effectively is a key aspect of software development. How would you read the configuration file of your application or parse it? This recipe will teach you what tools C++ offers to make this an enjoyable task with the std::stringstream class.
Learning how to manipulate I/O strings
How to do it...
In this section, we'll develop a program by using std::stringstream to parse streams, which can actually come from any source: files, strings, input arguments, and so on.
- Let's develop a program that prints all the entries of a file. Type the following code into a new CPP file, console_05.cpp:
...