FFFF CodeGraphContext/tests/sample_project_cpp at main · Dev7478/CodeGraphContext · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

README.md

C++ Sample Project

This folder contains a set of C++ files demonstrating major aspects and nuances of C++ programming, inspired by the Python sample_project. Each file is self-contained and focuses on a specific feature or idiom.

Files

  • control_flow.cpp: Demonstrates if/else, ternary, and for loop control flow.
  • classes.cpp: Shows classes, inheritance, and polymorphism.
  • templates.cpp: Covers function templates and specialization.
  • exceptions.cpp: Exception handling with try/catch blocks.
  • raii_example.cpp: Resource Acquisition Is Initialization (RAII) pattern.
  • function_chains.cpp: Function pointers, lambdas, and higher-order functions.
  • namespaces.cpp: Use of namespaces and the using directive.
  • stl_usage.cpp: STL containers and algorithms (vector, for_each, lambda).
  • file_io.cpp: Basic file input/output using fstream.
  • edge_cases.cpp: Edge cases such as empty files and comments only.

Each file is intended to be simple, focused, and suitable for code indexing, analysis, or as a reference for C++ language features.

0