const type identifier {value};
const type identifier = value;
const int OZ_PER_GALLON{128};
while (boolean expression) statement;
while (boolean expression) { body statements; }
cout, cin
can be tested as a boolean expression.
ifstream inFile; inFile.open("filename"); if (!inFile) { cout << "Error, could not open file" ; } inFile >> avar while (inFile) { ... inFile >> avar }
cin >> identifier
int a, b, c; char letter; // the following will read in data in the form // 3,4,5 cin >> a >> letter >> b >> letter >> c ; // the above code is teh same as cin >> a; cin >> letter; cin >> b; cin >> letter; cin >> c ;
type identifier = value
type identifier{value}