Giter Club home page Giter Club logo

stroustrup-ppp's Introduction

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.

stroustrup-ppp's People

Contributors

bewuethr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stroustrup-ppp's Issues

Chapter 16 exercise 6

I'm newbie, this program couldn't draw the clock until arrive return guimain(), so the clock hands couldn't update.

chapter 13 ex 3 Arrow

How can you solve this task? What formulas or algorithms did you use?
(file: Graph.cpp, function: Arrow::draw_lines() )

Chapter 11 ex12 not reversing order

Hello and thank you for making this repository available to everyone.

I was going through exercises today and tried to solve the exercise 12 from chapter 11 on my own. I got pretty close and eventually wrote the same code as you did. Once that did not work, I tried your code and what happens is that the order of the characters in a new file is not reversed even though everything seems to be correct. Would you check that when you catch some time?

Chapter 16 exercise 9

The program couldn't handle the input at the end of ( ), and result in breakpoint exception.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.