int month; // ... switch ( month ) // only applies to == { case 1: cout << "January"; break; case 2: cout << "February"; break; case 3: case 27: cout << "March"; break; // ... default: cerr << "ERROR: Invalid month!" << endl; } ******** * * * D * * a * * v * * e * * * ******** l-values r-values string a = "Kim"; string b = "Tom"; b[1] = a[1]; cout << a << '\n' << b << endl; l-value = r-value (x + y) = j; Constructing vectors: vector a; // empty vector -- use push_back() vector b( 100, 3.1415 ); // create a vector with 100 "slots" // assign each to 3.1415 // use push_back() to keep adding ... int n = 100; vector c( n * n ); // create vector of integers // size 10000 // use push_back() to keep adding ... vector d( b ); // "copy constructor" // create a new vector by first creating // a vector of size b, then COPYING all // elements from b vector e( d ); // "copy constructor" // vector> x; // try this out? ifstream ==> input file stream ofstream ==> output file stream ofstream outfile( "output.txt" ); // ofstream is the type // outfile is the variable name // output.txt is the filename outfile << "this is some output" << endl; int x = 5; outfile << x;