Skip to content

chihyang/CPP_Primer

Repository files navigation

C++ Primer Solutions

My solutions to C++ Primer(5th edition) exercises, including problems that perplex me. Makefile for visual studio compiler and gcc will be added later.

Contents

Compiler Version

  • gcc: (tdm64-1) 5.1.0
  • clang: 3.7.0 (tags/RELEASE_370/final)
  • cl: Visual Studio 2013, version 18.00.40629

File Format

Solutions to exercises

  • Header files

Exer07_26_Sales_data.h

Where Exer07_26 corresponds to exercise 7.26, _Sales_data corresponds to the (primary) class defined in the header.

  • Source files

Exer01_13_1.cpp

Where Exer01_13 corresponds to exercise 1.13, _1 corresponds to the first question in the exercise. Whether _1 (_2, _3 and so on) appears depends on the number of questions of the exercise.

Illustrations or verifications of key points

Page046_underline.cpp

Where Page046 corresponds to the page number of the key point, and underline is the key point to be illustrated or verified.

Comments

Warning

Not every file could compile. Some programs are intended for repeating an error so that I can know definitely what is correct and what is not. Every program that cannot be compiled successfully begins with a WARNING comment as below:

// Warning: This is for verification. It CANNOT be compiled successfully by both compiler.
// The problem lies in line XX.

Generally, compile info will be added to the end of such files.

Before or after line XX, there are comments for concrete explanation of the error.

Notes

Many files contain notes about explanations on perplexing points. Here is the list of files that contain notes:

Makefiles

Every chapter has a separate makefile. These makefiles are written in different ways to show the usage of make. See Makefile under each chapter folder for details.

About

My solutions to C++ Primer(5th edition) exercises.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages