C++ Cookbook

Front Cover

Despite its highly adaptable and flexible nature, C++ is also one of the more complex programming languages to learn. Once mastered, however, it can help you organize and process information with amazing efficiency and quickness.

The C++ Cookbook will make your path to mastery much shorter. This practical, problem-solving guide is ideal if you're an engineer, programmer, or researcher writing an application for one of the legions of platforms on which C++ runs. The algorithms provided in C++ Cookbook will jump-start your development by giving you some basic building blocks that you don't have to develop on your own.

Less a tutorial than a problem-solver, the book addresses many of the most common problems you're likely encounter--whether you've been programming in C++ for years or you're relatively new to the language. Here are just some of the time-consuming tasks this book contains practical solutions for:

  • Reading the contents of a directory
  • Creating a singleton class
  • Date and time parsing/arithmetic
  • String and text manipulation
  • Working with files
  • Parsing XML
  • Using the standard containers

Typical of O'Reilly's "Cookbook" series, C++ Cookbook is written in a straightforward format, featuring recipes that contain problem statements and code solutions, and apply not to hypothetical situations, but those that you're likely to encounter. A detailed explanation then follows each recipe in order to show you how and why the solution works. This question-solution-discussion format is a proven teaching method, as any fan of the "Cookbook" series can attest to. This book will move quickly to the top of your list of essential C++ references.

 

What people are saying - Write a review

User Review - Flag as inappropriate

A very hard language, but eloquent explanation of what each and every step does. C++ reads from right to <left, sometimes the other way. An STL self-learning must have.

User Review - Flag as inappropriate

This is an excellent book for people in sciences. I have over 130 books for C and C++ but all they tell you is the story on how to work with C++, something not suited to the taste of a scientist. The Science and engineering section has some very useful starting codes which can be combined with other codes to develop more powerful codes. This book out of all has the perfect way of being used by a scientist for his/her work.
Great book! Bring out a next edition with an expanded science section!
 

Contents

Preface
Building C++ Applications
Code Organization
Numbers
Strings and Text
Dates and Times
Managing Data with Containers
Algorithms
Exceptions and Safety
Streams and Files
Science and Mathematics
Multithreading
Internationalization
XML
Miscellaneous
Index

Classes

Other editions - View all

Common terms and phrases

About the author (2006)

Ryan Stephens is a software engineer, writer, and student living in Tempe, AZ. He enjoys programming in virtually any language, especially C++. His interests include the fields of information retrieval and data mining, and pretty much anything that has to do with algorithms and large data sets. When he's not working, writing, or programming, he plays with his kids, works on his house, or goes cycling.

Christopher Diggins is a freelance software developer and writer who has been programming computers since he was "haut comme trois pommes". Christopher writes regularly for the C++ Users Journal, and is the designer of the Heron programming lanugage.

Jonathan Turkanis is the author of the Boost Iostreams library and several other open source C++ libraries covering areas including smart pointers, runtime reflection, component architectures and aspect-oriented programming. He is a Ph.D. candidate in mathematical logic at the University of California at Berkeley.

Jeff Cogswell has been programming in several languages for many years. His background was previously in telecom, writing software for such strange things as network management protocols. Lately, however, his work has focused more on web development. After spending a few years in both Florida and California, Jeff now lives in Michigan. He's holding out for some warmer weather.