MCPcopy Create free account
hub / github.com/ShiqiYu/CPP

github.com/ShiqiYu/CPP @2025Spring

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2025Spring ↗ · + Follow
496 symbols 634 edges 166 files 9 documented · 2% updated 42d ago2025Spring · 2026-02-21★ 2,79510 open issues

Browse by type

Functions 403 Types & classes 93
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Chapter 1: Getting Started

  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

  9. Lecture notes

  10. Lab notes
  11. Examples

Chapter 2: Data Types and Arithmetic Operators

  1. Integer numbers
  2. Different integer types
  3. Floating-point numbers
  4. Constant numbers and constant variables
  5. Arithmetic operators
  6. Special notes

  7. Lecture notes

  8. Lab notes
  9. Examples

Chapter 3: Branching and Looping Statements

  1. if statement
  2. ? : operator
  3. Conditional expressions
  4. while loop
  5. for loop
  6. goto statement
  7. switch statement

  8. Lecture notes

  9. Lab notes
  10. Examples

Chapter 4: Data Structures

  1. Arrays
  2. Strings
  3. Structures unions and enumerations
  4. typedef

  5. Lecture notes

  6. Lab notes
  7. Examples

Chapter 5: Memory and Pointer

  1. Pointers
  2. Pointers and arrays
  3. Allocate memory in C style
  4. Allocate memory in C++ style

  5. Lecture notes

  6. Lab notes
  7. Examples

Chapter 6: Basics of Functions

  1. Functions
  2. Function parameters
  3. References
  4. return statement
  5. inline function

  6. Lecture notes

  7. Lab notes
  8. Examples

Chapter 7: Advances in Functions

  1. Default arguments
  2. Function overloading
  3. Function templates
  4. Function pointers and references
  5. Recursive functions

  6. Lecture notes

  7. Lab notes
  8. Examples

Chapter 8: Speedup Your Program

  1. C and C++ with ARM
  2. Speedup your program
  3. An example with SIMD and OpenMP
  4. Avoid memory copy in OpenCV

  5. Lecture notes

  6. Lab notes
  7. Examples

Chapter 9: Basics of Classes

  1. Classes and objects
  2. Constructors and destructors
  3. this pointer
  4. const and static members

  5. Lecture notes

  6. Lab notes
  7. Examples

Chapter 10: Advances in Classes

  1. Operators in OpenCV
  2. Operator overloading
  3. Friend functions
  4. User defined type conversion
  5. Increment and decrement operators

  6. Lecture notes

  7. Lab notes
  8. Examples

Chapter 11: Dynamic Memory Management in Classes

  1. Some default operations
  2. An example with dynamic memory
  3. Solution1: Hard copy
  4. Solution2: Soft copy
  5. Smart pointers

  6. Lecture notes

  7. Lab notes
  8. Examples

Chapter 12: Class Inheritance

  1. Improve your source code
  2. Derived class
  3. Access control
  4. Virtual functions
  5. Inheritance and dynamic memory allocation
  6. Examples in opencv

  7. Lecture notes

  8. Lab notes
  9. Examples

Chapter 13: Class Templates and std Library

  1. Class template
  2. Template non-type parameters
  3. Class template specialization
  4. std classes

  5. Lecture notes

  6. Lab notes
  7. Examples

Chapter 14: Error Handling

  1. Standard output stream and standard error stream
  2. assert
  3. Exceptions
  4. More about exceptions
  5. nothrow

  6. Lecture notes

  7. Lab notes
  8. Examples

Chapter 15: Nested Classes and RTTI

  1. Friend classes
  2. Nested types
  3. RTTI and type cast operators

  4. Lecture notes

  5. Lab notes
  6. Examples

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

Core symbols most depended-on inside this repo

Shape

Method 219
Function 184
Class 88
Enum 5

Languages

C++92%
Python5%
C2%
Rust1%

Modules by API surface

week12/examples/lab12/employee_destructor2.cpp17 symbols
week12/examples/lab12/employee_destructor1.cpp17 symbols
week12/examples/lab12/employee_demo1.cpp17 symbols
week12/examples/lab12/p_c_demo3.py12 symbols
week12/examples/lab12/duck_type.py12 symbols
week13/examples/specialization.cpp10 symbols
week12/examples/virtual.cpp10 symbols
week13/examples/matclass.cpp9 symbols
week12/examples/derive.cpp9 symbols
week09/examples/static.cpp9 symbols
week09/examples/const.cpp9 symbols
week15/examples/typeid.cpp8 symbols

For agents

$ claude mcp add CPP \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page