Week1_2

We learned the basic rules of C++ including literals, identifiers, symbols, variables, arithmetic operators, assignment, standard input/output (cin/cout). These topics are mainly from Chapter 2 of the textbook (Tapestry).  However, input stream (cin), variables, data types and arithmetic operators are in Sections 3.1 and 3.2. Assignment operator is discussed in Section 4.1.

Then we continued with other basic data types such as char, double and other versions of int. We covered limits of these data types and discussed integer overflow. These are in basics2.ppt file below. Topics are mostly from Chapter 3 of the textbook (up to section 3.4), but it includes assignment operator which is in Chapter 4 of the book. Integer and real representation and limits are not detailed in the book. short, signed, unsigned are not explained in the book either.

Example programs we covered in the class (area.cpp, time.cpp and time2.cpp) are not in the book. These programs are given below. We could not cover time.cpp and time2.cpp but have a look at those too.

The .swf file (animation) should be copied to the same folder as the basics.ppt file.

Powerpoint files and animations
basics.ppt

basics2.ppt

cin.swf

C++ codes discussed in class (some of them might have been modified in class to show extra features)
area_cpp

time_cpp

time2_cpp

daysecs_cpp

fahrcels_cpp