Date |
Key Concepts |
2025.7.7 ch.0,
code
|
- Introduction
- Syllabus
- Briefing computer systems: CPU & memory
- First C++ program: Hello, C++
- Basic io: cin/cout
- Supplementary materials
|
2025.7.8 ch.1,
code
|
- Data types, variables, operators (cont'd)
- Variable declaration & the computation model (concept of memory address)
- Data types:
int , double , string , bool
- Basic operators: arithmetic (+-*/%), assignment (=), compound arithmetic operators (+=, -=, *=, /=, ++, --)
- (FYR) Michael Lewin, All About XOR, 2012
|
2025.7.9 ch.2,
code
|
- Flow controls
- Branching:
if-else with relational & logical operators, switch-case-default-break , A ? B : C
- Repetitions:
while loops, do-while loops
- Loop examples: sum over 1 ... 100, GCD, play dices by using random integers, compounding, Monte Carlo simulation for π, binary search
|
2025.7.10 (video) code
|
- Flow controls (cont'd)
- Repetitions:
for loops
- Loop examples: sum over 1 ... 100, GCD, play dices by using random integers, compounding, Monte Carlo simulation for π, binary search
- Jump statements (
break , continue )
- Weekend homework
- Number-guessing game due by 7.14
|
2025.7.11 ch.3,
code
|
- Flow controls (cont'd)
- Nested loops
- Analysis of algorithms
- Data structures & algorithms
- Arrays
- Zero-based indexing: Why starting from 0?
|
2025.7.14 code
|
- Data structures & algorithms (cont'd)
- Descriptive statistics: max, min, sum, mean, and standard deviation
- Sorting: bubble sort, selection sort, insertion sort
- Random permutation (aka shuffling)
- char arrays and C++ strings
- 2D arrays
- Case study: matrix multiplication
- Case study: tic-tac-toe game
|
2025.7.15 ch.4,
code
|
- Functions
- User-defined function
- Call stack & variable scope
- Function overloading
- Special issue:
int main(int argc, char** argv)
- Recursion: factorial, sum, gcd, Fibonacci numbers
|
2025.7.16 ch.5,
code
|
- Pointers
- Syntax & concepts
- Pass by address: swap
- Pointer vs. array
- Dynamic memory allocation: heap,
new / delete
- 2D arrays (static vs. dynamic)
- Function pointer
|
2025.7.17 ch.6,
ch.7,
code
|
- Pointers (cont'd)
typedef : alias for your own type
- Constant pointers
- C++ syntaxes: reference,
auto , for-each loop, smart pointers (std::unique_ptr<T> and std::shared_ptr<T> )
- More user-defined types:
struct , class , enum class
- C++ generics:
template
- Data structures
- Linked list
- Binary tree
- Adjacency list for graphs
- MISC
- Preprocessor, compilation, and linking
- Debugger: gdb
- Use bits/stdc++.h
array<T>
vector<T>
map<K,V>
- File IO
- Standard Template Library (STL)
- Boost
|
2025.7.18
|
- Final exam
- Feedback sheet
|
Promotion |
|