Introduction to C++

Course Description

This course is designed for undergraduate and graduate students in science, social science and engineering programs who need to learn fundamental programming skills quickly but not in great depth. The course is ideal for undergraduate research positions or summer jobs requiring C++. It is not a class for experienced programmers in C++. Students with no programming background are welcome. Topics include control structures, arrays, functions, classes, objects, file handling, and simple algorithms for common tasks.
This course is offered during the Independent Activities Period (IAP), which is a special 4-week term at MIT that runs from the first week of January until the end of the month.

Lecture Notes

Special software is required to use some of the files in this section: .h, .cpp, .cbp, and .zip.
Notes from Lecture 8 are not available.
LEC #
TOPICS
1
Basics (PDF)
2
Control structures (PDF)
3
Functions (PDF)
4
Arrays (PDF)
5
Pointers (PDF)
6
Classes, part 1 (PDF)
7
Classes, part 2 (PDF)
8
Object-oriented programming
9
File handling, operator overloading, and exceptions (PDF)
10
Comprehensive case study, Standard Template Library (STL) (PDF)
Demonstration code for case study (ZIP)
(The ZIP file contains: 5 .cpp files, 4 .h files and 6096-Demo.cbp file.)

Assignments

This section contains problem sets that students worked on in the twice-weekly lab sessions, and then completed as homework assignments.
WEEK #
TOPICS
ASSIGNMENTS
SOLUTIONS
1
Basics
Problem set 1 (PDF)
Problem set 2 (PDF)
(PDF)
(PDF)
Control structures
Functions
2
Arrays
Problem set 3 (PDF)
Problem set 4 (PDF)
(PDF)
(PDF)
Pointers
Classes, part 1
3
Classes, part 2
Problem set 5 (PDF)
Problem set 6 (PDF)
(PDF)
(PDF)
Object-oriented programming
4
File handling
Problem set 7 (PDF)
(PDF)
Comprehensive case study, Standard Template Library (STL)

No comments:

free counters