April 2011
Beginner
624 pages
11h 34m
English
With the ability to process data, print and analyze strings, and access disk files, you already have the tools to write some serious C++ programs. But there are some other tricks to point out before we leave the basics and focus on C++0x and object orientation.
We start with the topic of command-line arguments, a feature that can be used to improve the programs in Chapter 8.
All the programs in Chapter 8 operate on files. The first thing each of these programs does (after declaring variables) is prompt the user for a filename.
cout << "Enter a file name and press ENTER: ";cin.getline(filename, 80);
This works, but it’s not always the ideal solution. People using the DOS command line—or ...
Read now
Unlock full access