1/7
Missing escape sequences, getline
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What do you need to use Cout and Cin?
#include <iostream>
Cout
The standard output object, displayed data on the screen
«
sends data from the program to an output object
Endl(endline)
A special command that directs the output to advance to the next line for future printing
Cin
The standard input object, gets data that user typed for the program
»
used to place data from an input object into variables
What are the prerequisites before using cin?
The variable must be declared before it is used in cin
Problems with implementing cin
Results are unpredictable if the user enters data of an incorrect type
When getting input using a string from the keyboard, it cannot have any spaces