"In C++, it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg." -- Bjarne Stroustrup
C++, and its older cousin, C, consistently remain in the top three most popular programming languages used today (see the TIOBE programming community index). Virtually every piece of desktop software you use is backed by either C or C++. In short, C++ is one of the most relevant programming languages today even though it is over 30 years old, and there are no signs of its slowing down.
This page will get filled out with links to slides, example code, and brief lecture notes as the semester progresses.
Syllabus
- Week 1, 9/3: Introduction, C++ syntax, compilation process, arrays, C++ I/O
- Week 2, 9/9: File I/O, streams, debugging
- Week 3, 9/17: Classes (constructors, access control), header files, preprocessor
- account.h: Example of class header file
- account.cpp: Example of class implementation
- atm.cpp: Main program that uses Account
- Makefile: Put this file in the same directory as the account files, run 'make', and everything gets built. You should modify this file to work with other projects.
-
Week 4, 9/24: Operators, const
- Week 5, 10/1: Pointers, C++ memory model, references, new/delete
- str.h str.cpp
str_test.cpp: Example of new/delete using a simple string class
- Lecture notes on pointers from MIT's OpenCourseWare C++ course. These make a good introduction to pointers.
- Week 6, 10/8: STL, pointer review, c++@Penn
- Week 7, 10/15: Linked lists
- Week 8, 11/5: Template metaprogamming, Qt