CSE399: C++

Spring 2007
Instructor: Drew Hilton (adhilton@cis.upenn.edu)
Office hours: Tues 2:30-3:30, Wed 12-1, or by appointment in Levine 614
(Note, there are two doors- mine is on the side by the little lobby area- I may move out to the lobby area to avoid disturbing office mates).
Class Location: Towne 309
Class Time: Monday 12-1
TAs: Chris "Skiz" Czyzewicz (eczyzewi@seas) (Thu 3-4:30, HMS lab across from Moore 100)
and Noorain Ahmed (noorain@seas) (Thu 5-6, Fri 1-2 SEAS computer lab in Moore)

The course syllabus can be downloaded here.

Announcements

Homeworks

Homeworks may be done in pairs, as long as both partners participate in the learning experience. You must document who you worked with and in what manner in a comment in the source code you submit.

Homework 1 is due Wed, Jan 17th Mon, Jan 22nd at noon.
These source files go with it:
Homework 2 will be due Mon Jan 29th at noon.
Solutions for Homework 2.
Homework 3 will be due Mon Feb 12th at noon.
Homework 4 will be due Mon Feb 19th 26th, at noon.
Homework 5 will be due Mon Mar 19th

Slides

  1. Policies and intro to C
  2. Datatypes and Pointers
    If you still don't get pointers, O'Reily has the pointer chapter of Practical C online, you might check it out.
  3. Lecture 3 does not have slides, but here is a quick-reference of what we covered about gdb
  4. Loose ends in C
  5. Pass by reference, Templates, Operator Overloading, C++ style IO
  6. Copy constructors and Inheritance
  7. References and Multiple Inheritance
  8. STL and casting
  9. Skiz's guest lecture on GUIs
  10. Fan mail

Other stuff

Many of you are doing projects involving graphics. I've mentioned in class that SDL is a useful thing for these sorts of things. You can find a bunch of information by reading the relevant man pages, but here is a brief graphics demo to get you started:
graphics_demo.c
Note that this should be compiled with the following command line:
gcc -I /usr/include/SDL -ographics_demo graphics_demo.c -lSDL
You may be unfamiliar with two of the aspects of this:
-I /usr/include/SDL tells the compiler to also look for include files in /usr/include/SDL (which is a place it doesn't normally look
-lSDL Tells the linker to link with the SDL library
Note that unlike other things, you won't be able to run this program remotely over Putty or SecureCRT, since it has to use the video card.

It doesn't do too much exciting- just draws a kinda neat looking curvy pattern- you can move the pattern around with the arrow keys, and quit with ESC

More Project Info

Some of you were wanting to know more information on the project, and some have asked me about some of the information that I originally had given about it, which I've changed my mind on. Basically, we will take the last week of class, and you will setup a time (hopefully most people during the scheduled MWF12-1 timeslot) with me to demo. The demo should probably last about 5-10 minutes, in which you will show me what your project does, possibly let me play with it a bit, and I'll ask you some questions about it (Except me to ask you what C++ specific (as opposed to just straight C) came in handy in writing your project). Additionally, I will want you to email me your source code in advance of your demo, so I can look at it beforehand. You may write your project on any platform you choose, as long as you can reasonably demo it to me at school (in a lab or on your laptop).
The original project informatio specified that a Makefile was required- this was when I planned to just test them all, now that I've decided to do demos, a Makefile is not required.
If you have questions, please don't hesitate to ask me.

Project Sign ups

Please email me to sign up for a demo time during the last week of classes, preferably during the MWF 12-1 timeslots. Demo times will be in 10 minute increments and will be given in a first come/first serve fashion. Below is a table indicating which timeslots are taken. Timeslots with initals are taken, all other time slots are currently available:
Time  Monday    Wednesday  Friday 
12:00-12:10 JG NS ZL
12:10-12:20 ND YS AT
12:20-12:30 AW MM JR
12:30-12:40 FI RN JD
12:40-12:50 IC AC DB
12:50-1:00 AK AA DP