Skip to content

Kevin-Oudai/my_cpp_solutions

Repository files navigation

My C++ Solutions

This repository began as my solutions to the exercises in Introduction to Programming with C++ (3rd Edition) International Edition by Y. Daniel Liang. It now documents the transition from solving those book-based problems to crafting high-quality prompts for Codex, OpenAI's code generation model.

Starting from Chapter 12, each solution is designed as a Codex prompt followed by AI-generated C++ code. Earlier chapters contain hand-written solutions created while progressing through the book, sticking to the rule that no syntax is used before it appears in the text. The original problem statements are not included here due to copyright restrictions.

I am learning this as a hobby, so updates are not regular.

Using This Project with Codex

  1. Each chapter directory from Chapter 12 onward contains a prompt.md describing the problem.
  2. Provide the prompt to Codex and let it generate an initial C++ solution.
  3. Review, run, and refine the generated code.
  4. Commit both the prompt and the final code so readers can see the prompt–response pair.

Contributor Guidelines

If you'd like to contribute:

  • Write prompts in Markdown with a clear title, description, constraints, and sample I/O.
  • Place prompts and generated solutions in the appropriate chapter directory.
  • Keep prompts and solutions in separate blocks and note any manual edits made to the AI-generated code.

Completed Solutions

  • Chapter 1: Introduction to Computers, Programs and C++ (8th May 2021)
  • Chapter 2: Elementary Programming (19th May 2021)
  • Chapter 3: Selections (23rd May 2021)
  • Chapter 4: Mathematical Functions, Characters and Strings (30th May 2021)
  • Chapter 5: Loops (18th June 2021)
  • Chapter 6: Functions (23rd June 2021)
  • Chapter 7: Single-Dimensional Arrays and C-Strings (3rd September 2021)
  • Chapter 8: Multidimensional Arrays (02nd February 2022)
  • Chapter 9: Objects and Classes (04th February 2022)
  • Chapter 10: Object-Oriented Thinking (13th March 2022)
  • Chapter 11: Pointers and Dynamic Memory Management (24th March 2022)
  • Chapter 12: Templates, Vectors and Stacks (Pending – Codex prompt format)

About

These are my solutions to the exercises listed inside of Introduction to Programming with C++ by Y. Daniel Liang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages