Skip to content

Lecture notes, projects and other materials for Course 'CS205 C/C++ Program Design' at Southern University of Science and Technology.

Notifications You must be signed in to change notification settings

Shichenli98/sustech_CPP

 
 

Repository files navigation

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

Why Should You Take This Course?

C and C++ have a big overlap in syntax. The standards of C and C++ are also very long, and still in evolution to accept new features. This course will not cover all aspects of C and C++. It is impossible. The course focuses on the most important and unique parts of C and C++. Pointers and memory management will be described and explained almost through all chapters. They make many beginners even experienced developers crazy for bugs difficult to find. But they are important for computing efficiently, and also are the unique advantages of C and C++. Some people hate them, and some love them. We can say pointers and memory management make C and C++ unique to most other advanced programming languages.

The course is designed for undergraduate students who have learnt Java or Python. If the students taking this course have some background knowledge of programming, such as knowing a little Java or Python, it will be helpful. If not, it is also not a problem.

  1. The first example
  2. Different programming languages
  3. Compile and link
  4. Different errors
  5. Preprocessor and macros
  6. Simple input and output
  7. Command line arguments
  8. Exercises
  1. Integer numbers
  2. Different integer types
  3. Floating-point numbers
  4. Constant numbers and constant variables
  5. Arithmetic operators
  6. Special notes
  1. if statement
  2. ? : operator
  3. Conditional expressions
  4. while loop
  5. for loop
  6. goto statement
  7. switch statement
  1. Arrays
  2. Strings
  3. Structures unions and enumerations
  4. typedef
  1. Pointers
  2. Pointers and arrays
  3. Allocate memory in C style
  4. Allocate memory in C++ style
  1. Functions
  2. Function parameters
  3. References
  4. return statement
  5. inline function
  1. Default arguments
  2. Function overloading
  3. Function templates
  4. Function pointers and references
  5. Recursive functions
  1. C and C++ with ARM
  2. Speedup your program
  3. An example with SIMD and OpenMP
  4. Avoid memory copy in OpenCV
  1. Classes and objects
  2. Constructors and destructors
  3. this pointer
  4. const and static members
  1. Operators in OpenCV
  2. Operator overloading
  3. Friend functions
  4. User defined type conversion
  5. Increment and decrement operators
  1. Some default operations
  2. An example with dynamic memory
  3. Solution1: Hard copy
  4. Solution2: Soft copy
  5. Smart pointers
  1. Improve your source code
  2. Derived class
  3. Access control
  4. Virtual functions
  5. Inheritance and dynamic memory allocation
  6. Examples in opencv
  1. Class template
  2. Template non-type parameters
  3. Class template specialization
  4. std classes
  1. Standard output stream and standard error stream
  2. assert
  3. Exceptions
  4. More about exceptions
  5. nothrow
  1. Friend classes
  2. Nested types
  3. RTTI and type cast operators

Reference

  1. Mr. Yitong Wang's repo for the course in Fall 2020. https://github.com/YeeTone/CS205-2020Fall
  2. Mr. Zheng Dong's repo for the course in Fall 2021. https://github.com/XDZhelheim/CS205_C_CPP_Lab
  3. Mr. Wenqian Yan's repo for the course in Fall 2022. https://github.com/YanWQ-monad/SUSTech_CS205_Projects

About

Lecture notes, projects and other materials for Course 'CS205 C/C++ Program Design' at Southern University of Science and Technology.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.6%
  • C 6.3%
  • CMake 1.2%
  • Makefile 0.9%