Csce 121
Csce 121
Fall 2013
1/24
Fall 2013
2/24
Fall 2013
3/24
Examples
linked lists
queues
stacks
trees
heaps
graphs
Fall 2013
4/24
Data Organization
Fall 2013
5/24
Fall 2013
6/24
C++ Containers
Containers
Associative
Simple
Sequences
Adapters
pair
vector
queue
set
unordered_set
bitset
list
stack
multiset
unordered_multiset
array
deque
priority queue
map
unordered_map
string
multimap
unordered_multimap
ordered
unordered (C++11)
Fall 2013
Others
7/24
Fall 2013
8/24
Fall 2013
9/24
C++ Programs
Any program usually performs three basic operations: it gets
data, manipulates the data and outputs the results.
A C++ program is a collection of functions and classes which
obey their predefined syntax.
Writing and editing a source code.
Divide a problem into classes, and decide how they should
interact.
Write and edit a C++ source code using a text editor (do not
use a word processor). For instance, Windows XP/7/8 editors
are notepad or edit, and UNIX/Linux editors are: emacs,
vi, or pico.
You can use Visual Studio on Windows.
Your code should be readable add meaningful comments.
Fall 2013
10/24
Fall 2013
11/24
Fall 2013
12/24
Fall 2013
13/24
Example
Fall 2013
14/24
Fall 2013
15/24
Running a Program
Fall 2013
16/24
Debugging a Program
Fall 2013
17/24
Problem Analysis
Structured Design
Implementation
Fall 2013
18/24
Problem Analysis
Fall 2013
19/24
Structured Design
Fall 2013
20/24
Implementation
Fall 2013
21/24
Fall 2013
22/24
Fall 2013
23/24
Fall 2013
24/24