Don't forget to fill out the mid-quarter evaluation at! Your comments really make a difference!


Assignment 1 Due, Assignment 2a/b Out
November 20, 2008

Assignment 1: grid is due tonight at 11:59 PM, so please try to have it turned in by then. Today I'll give out assignments 2a and 2b. Due to a last-minute technical mishap, it looks like the graphics and input code for Assignment 2a: MyPhoton does not work correctly on Macintosh computers. To avoid unfairly penalizing Mac users, I've also offered a second project, Assignment 2b: Where Am I?, which is a classic assignment that exercises functional programming techniques. You are free to work on either of the two assignments and can submit either for credit. However, you completing both assignments will not count as credit for two different assignments.

Correction to grid Handout
November 16, 2008

The original handout for Assignment 1: grid contained a small mistake in the section about using typename in conjunction with the MutableReference class. The error has been corrected and the updated version of the handout is now available on the course website. This fix doesn't change the assignment in any way - it just corrects a syntax error.

Assignment 1 Out
November 5, 2008

Assignment 1: grid went out today and is due on Thursday, November 20 at 11:59 PM. The testing code referened in the handout is also available on this site. Feel free to email me with any questions or comments about the assignment.

Good luck!

Assignment 0 Due 11:59PM
October 30, 2008

Assignment 0: Evil Hangman is due tonight at 11:59PM, so please try to have it in by then if you want to complete this assignment for credit. As always, feel free to email me if you have any questions.

Midquarter Evaluation Online
October 22, 2008

The CS106L Midquarter Evaluation form is available online at under the "Forms and Events" header. This is the third quarter we've ever offered this class and we want to hear how you think it's going. We will take your feedback seriously! It should only take you a few minutes to fill out the form, but it can really make a difference in how the rest of the quarter goes. All responses will be kept anonymous.

CityFinder Example Code Online
October 16, 2008

The sample code from the CityFinder example is now online, along with the place-data.txt data file. Feel free to experiment with the code, and feel free to email me if you come up with any interesting applications!

In case you're interested, the original US Census data file can be found at

Assignment 0 Out
October 16, 2008

Assignment 0: Evil Hangman went out today and is due on Thursday, October 30 at 11:59 PM. The dictionary.txt file referenced in the assignment can be found here. Feel free to email me with any questions or comments about the assignment, or if you have any amusing stories about demoing the assignment to your friends.

Good luck!

No Class October 9
October 8, 2008

CS106L will not be meeting this Thursday, October 9. Enjoy the time off!

Welcome to CS106L!
September 22, 2008

Welcome to CS106L! We've got an exciting quarter ahead of us and you're in for a real programming treat. Classes meet Wednesday and Thursday from 4:15 to 5:15 in 060-120 and I hope you're able to attend. I'll try to stick around afterwards for a little bit to answer questions so you can get the most out of the class.

This class is appropriate for almost anyone who wants to expand his or her knowledge of C++. If you have only a rudimentary background in C++, this class will quickly fill you in on some of the more advanced C++ concepts and syntax along with a solid understanding of the libraries. For those of you with many years of C++ experience, this class will almost certainly cover topics you haven't been exposed to - after all, C++ is an enormous language!


00: Course Information
01: C++ Standard Library
02: Writing Without Genlib.h
03: IOStream Library
04: C Strings
05: Preprocessor Intro
06: Preprocessor Techniques
07: STL Containers, pt. 1
08: STL Iterators, pt. 1
09: STL Containers, pt. 2
10: Assignment 0
11: STL Iterators, pt. 2
12: STL Algorithms
13: const
14: Initializer Lists
15: static
16: Conversion Constructors
17: Copy Ctors and Assn. Opers.
18: Operator Overloading
19: Assignment 1
20: Functors
21: STL <functional> library.
22: Intro to Exception Handling
23: Inheritance
24a: Assignment 2a
24b: Assignment 2b
25: C++0x


Assignment 0: Evil Hangman
dictionary.txt for Assn. 0.
Assignment 1: grid
Testing code for Assn. 1
Assignment 2a: MyPhoton
PC starter code for MyPhoton
Assignment 2b: Where Am I?
Starter code for Where Am I?


STL Prioritized Reference
C++ Resources Network
C/C++ Library Reference
Bjarne Stroustrup's C++ Page
CS106X page

Lecture Code

0.0: Basic cin usage.
0.1: stringstream examples.
0.2: simpio.h functions.
1.0: Integer removal.
1.1: Hex viewer.
2.0: C string functions.
3.0: #define errors.
4.0: Basic STL stack.
4.1: Basic STL queue.
4.2: Stack time trial I.
4.3: Stack time trial II.
4.4: push_back time trial.
4.5: push_front time trial.
4.6: Element access trial I.
4.7: Element access trial II.
5.0: Basic STL set.
5.1: Basic STL map.
6.0: CityFinder example.
6.1: place-data.txt for CityFinder.
7.0: Averaging numbers.
7.1: Set algorithms.
7.2: ConvertToUpperCase.
8.0: Hearts example.
9.0: Initializer list time trial.
10.0: DebugVector example.
11.0: DebugVector example, pt 2.
11.1: List example.
12.0: count_if plus a functor.
12.1: BiasedSort comparison functor.
12.2: Derivative functor.
12.3: Counting ints using <functional>.
13.0: StringToInteger implementation.
13.1: Linked lists and auto_ptr.
14.0: SharedPointer example.
14.1: Lexicon example.
15.0: Engines example.
16.0: C++ class implementation [PDF].
16.1: Advanced inheritance techniques.
17.0: GDFReader example.
18.0: Intro to C++0x [PDF].
18.1: Recommended Readings [PDF].
18.2: Template Metaprogramming.