MCPcopy Create free account
hub / github.com/bewuethr/stroustrup-ppp

github.com/bewuethr/stroustrup-ppp @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
4,844 symbols 11,210 edges 794 files 800 documented · 17% updated 4y ago★ 3411 open issues

Browse by type

Functions 3,960 Types & classes 884
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Exercises from "Programming – Principles and Practice using C++" by Stroustrup

Exercises from Stroustrup's "Programming – Principles and Practice Using C++" (First Edition). Some sample solutions by Stroustrup can be found here. The directory ppt_slides contains the old version of the slides on Stroustrup's website, as the current ones are updated for the 2nd edition of the book and C++11. In code_snippets are all the code examples in the book, taken from the book's website.

I was working with Visual Studio 2013 Express for Chapters 1–18, then I changed to Code::Blocks. Everything I've uploaded here was tested to compile in Code::Blocks using MinGW GCC 4.8.1. From Chapter 21 on, I switched to Visual Studio Community 2013.

Notice that some solutions require using an older C++ standard when compiling, for example Chapter 17, exercise 4: use something like

g++ --std=c++03

to compile (under Linux).

Chapter 1 has no programming exercises, and for Chapter 2 I just went along and changed the same file over and over, so these solutions are not here.

Chapters 12–16 deal with GUI/graphics and use FLTK. The actual work there is not in the files containing main, but in lib_files/Graph.cpp and lib_files/Simple_window.cpp. I've done a little write-up about setting up FLTK under Visual Studio Community 2013 here; Philipp has created an updated version of that (for FLTK 1.3.4 and Visual Studio 2017) on his website.

Core symbols most depended-on inside this repo

Shape

Function 1,981
Method 1,979
Class 813
Enum 71

Languages

C++98%
C2%

Modules by API surface

lib_files/Graph.h151 symbols
chapter24/Matrix.h103 symbols
code_snippets/Chapter24/Matrix.h102 symbols
chapter22/chapter22_Graph.h89 symbols
chapter19/chapter19_ex14_Graph.h86 symbols
lib_files/Simple_window.h81 symbols
code_snippets/GUI/Graph.h78 symbols
chapter26/Graph.h78 symbols
chapter21/chapter21_ex11_Graph.h76 symbols
lib_files/Graph.cpp60 symbols
chapter19/chapter19_ex14_Graph.cpp42 symbols
lib_files/Simple_window.cpp32 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page