CPP
CPP copied to clipboard
Lecture notes, projects and other materials for Course 'CS205 C/C++ Program Design' at Southern University of Science and Technology.
Programming in C/C++ Efficiently
Course 'CS205 C/C++ Program Design' in 2021 Fall at Southern University of Science and Technology. The lecture videos can be found at https://www.bilibili.com/video/BV1Vf4y1P7pq
Chapter 1: Getting Started
- The first example
- Different programming languages
- Compile and link
- Preprocessor and macros
- Simple input and output
- Lecture notes
- Lab notes
- Examples
Chapter 2: Data Types and Arithmetic Operators
- Integer numbers
- More integer types
- Floating point numbers
- Arithmetic operators
- Lecture notes
- Lab notes
- Examples
Chapter 3: Loops and Branching Statements
-
if
statement - Conditions
-
while
loop -
for
loop -
goto
switch
- Lecture notes
- Lab notes
- Examples
Chapter 4: Data Structures
- Arrays
- Strings
- Structures unions and enumerations
-
typedef
- Lecture notes
- Lab notes
- Examples
Chapter 5: Memory and Pointer
- Pointers
- Pointers and arrays
- Allocate memory in C style
- Allocate memory in C++ style
- Lecture notes
- Lab notes
- Examples
Chapter 6: Basics of Functions
- Functions
- Function parameters
- References
-
return
statement -
inline
function
- Lecture notes
- Lab notes
- Examples
Chapter 7: Advances in Functions
- Default arguments
- Function overloading
- Function templates
- Function pointers and references
- Recursive functions
- Lecture notes
- Lab notes
- Examples
Chapter 8: Speedup Your Program
- C and C++ with ARM
- Speedup your program
- An example with SIMD and OpenMP
- Avoid memory copy in OpenCV
- Lecture notes
- Lab notes
- Examples
Chapter 9: Basics of Classes
- Classes and objects
- Constructors and destructors
-
this
pointer -
const
andstatic
members
- Lecture notes
- Lab notes
- Examples
Chapter 10: Advances in Classes
- Operators in OpenCV
- Operator overloading
- Friend functions
- User defined type conversion
- Increment and decrement operators
- Lecture notes
- Lab notes
- Examples
Chapter 11: Dynamic Memory Management in Classes
- Some default operations
- An example with dynamic memory
- Solution1: Hard copy
- Solution2: Soft copy
- Smart pointers
- Lecture notes
- Lab notes
- Examples
Chapter 12: Class Inheritance
- Improve your source code
- Derived class
- Access control
- Virtual functions
- Inheritance and dynamic memory allocation
- Examples in opencv
- Lecture notes
- Lab notes
- Examples
Chapter 13: Class Templates and std Library
- Class template
- Template non-type parameters
- Class template specialization
-
std
classes
- Lecture notes
- Lab notes
- Examples
Chapter 14: Error Handling
- Standard output stream and standard error stream
-
assert
- Exceptions
- More about exceptions
-
nothrow
- Lecture notes
- Lab notes
- Examples
Chapter 15: Nested Classes and RTTI
- Friend classes
- Nested types
- RTTI and type cast operators
- Lecture notes
- Lab notes
- Examples
Reference
- Mr. Yitong Wang's repo for the course in Fall 2020. https://github.com/YeeTone/CS205-2020Fall
- Mr. Zheng Dong's repo for the course in Fall 2021. https://github.com/XDZhelheim/CS205_C_CPP_Lab