Textbook

Walter Savitch, Absolute C++, Addison Wesley.

Visual Studio

Visual  Studio .net 2003  is free for PIC10A students. For more information, pleaase check
http:http://www.pic.ucla.edu/piclab/msdnaa/

If you have the textbook, there is a CD comes with the book. The CD has an older verion of Visual C++.  You can still use it for your HW, but there are some small differences.  Click here for more information.

Course

  1. Introduction. Programming and programming languages. Compiler and linker. History and design of C++.
  2. Hello, world. Structure of simple programs. #include. Basic output. Comments.
  3. Variables, arithmetic. Basic built-in types (int, double, bool, char, float). Declaring variables. Input. Basic arithmetic, integer vs. floating-point. Some math functions (pow, sqrt).
  4. Control. If statement, conditions, multiway if statements. Relational operators. Compound conditions and short-circuit evaluation. Loops: while, do, for. = vs. == and value returned by =. Switch statement. Break statement. Conditional expression.
  5. Functions and variables. Declaring and defining functions. Pass by value. References and pass by reference. Local variables. Scope of variables. Void functions. Const variables. Global variables. Overloading functions.
  6. More input and output. File input and output. Additional i/o topics as needed (e.g., manipulators).
  7. Arrays. Declaring and using 1d arrays. Passing to functions, const array parameters. Sequential search algorithm. Two-dimensional arrays (declaring, using, passing to functions).
  8. Strings. C-style character strings and the null character. C++ string type. Basic operations for each (i/o, assignment, comparisons, concatenation, length).
  9. Pointers. Basic definition and use. NULL pointer. Dynamic memory management using new and delete. Memory leaks. Dynamic 1d arrays and array delete. Perhaps: connection between arrays and pointers, the arrow operator, and emulating pass by reference by passing pointer by value.
  10. Structures and Classes. Basic use of structures. Member variables. Introduction to classes: objects, public and private access, member functions.