/tcpppl-ex

Exercises from The C++ Programming Language 4th edition

Primary LanguageC++

TCPPPL exercises

These are exercises from The C++ Programming Language (4th Edition) [1]. We only put here the exercises of the "write-a-program" variety.

List of exercises

For future reference, here is the list of exercises with keywords.

X.3 A tour of C++: the basics

  • x_3_3: Hello world.
  • x_3_5: Printing built-in types and std::string.
  • x_3_6: Reading built-in types and std::string.

X.5 A tour of C++: Containers and algorithms

  • x_5_5: Reading built-in types and std::string.
  • x_5_6: struct with operator>> and operator<<.
  • x_5_7: Printing and sorting vector of numbers.
  • x_5_8: Printing and sorting vector of strings.
  • x_5_9: Writing numbers to a file.
  • x_5_10: Reading numbers from a file.

X.6 A tour of C++: Concurrency and utilities

  • x_6_2: Parallel threads printing.
  • x_6_3: Timing.
  • x_6_4: Random number generation, normal distribution, histogram printing.
  • x_6_5: Matching all decimal numbers in a file using a std::regex.

Rest of the exercises under progress.

References

  1. https://www.stroustrup.com/4thExercises.pdf