-
Book Overview & Buying
-
Table Of Contents
The C++ Workshop
By :
I/O stands for input/output and is how we get information in and out of our programs. This can take many forms, from inputting text via a keyboard, to clicking buttons with our mouse, to loading a file, and so on. In this chapter, and in general moving forward, we're going to be sticking with text input/output. For this, we'll use the iostream header.
Throughout this section, we'll be reading directly from input with little to no data validation. In a working application, however, input would be strictly validated to ensure it's of the correct format, among other things. Our lack of this is strictly for example purposes only.
The iostream header contains everything we need to interface with our applications via the keyboard, allowing us to get data in and out of our application. This is accomplished through the std::cin and std::cout objects.
Note
The std:: prefix here denotes a namespace. This will be looked at in more depth...