Join Bill Weinman for an in-depth discussion in this video About C++, part of Code Clinic: C++.
This is the C++ version of this course. All of these solutions are written in C++. C++ is a relatively low-level programming language. That means that it's fast and powerful, but it also presents unique challenges that you don't see with other higher-level languages. One important distinction is that C++ relies a great deal on standard system libraries in order to mitigate the inherent differences between platforms. While I've made every effort to make my code as standard and compatible as possible, some code may not work on your system out of the box and may require modification for your environment.
I wrote these examples on a Mac, using Xcode with the Clang C++ compiler on OS X, version 10.9 Mavericks. This is a modern compiler on a modern posix compatible operating system that supports the latest standards. I've also tested these examples on Linux, using GCC. And where possible on Windows 8.1 using Microsoft Visual C++. For some of the solutions, I use open-source libraries like SQL Lite for storage or libjpeg-turbo for reading JPEG files.
On the other hand, where possible and practical, I've written my own classes for a number of purposes including a database wrapper, HTTP access, CGI and simple string and number classes. I have made this choice primarily to show you how some of these simpler capabilities are implemented. Also, I hope you'll find it valuable to know how to roll your own classes for simple solutions to common problems. Even something like a string or a numbered class can provide significant gains and performance and flexibility.
Over the more generic STL classes when it's targeted to your particular application. Finally, you'll notice a folder in the exercise files called Windows. The CMC++ standard libraries are intended to make it possible to write code on one system. And compile and run it on another system with minimal changes. Because Microsoft's Visual C++ runtime library doesn't provide some of these standard functions or provides them with different names and calling conventions, it's not always possible to compile and run Unix code on Windows.
In order to make this easier I provided a few compatibility libraries where necessary. This folder will likely grow as this series grows in the future. The point of this series is to provide you with the opportunity to experiment and learn from some classic computing problems. Remember to take your time, write your own solutions, and experiment a lot. Hopefully, you'll learn something from my solutions as well.
Bill introduces challenges and provides an overview of his solutions in C++. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, Java, PHP, Python, and Ruby.