Writing, throwing, and catching custom exception classes.
Up next week, c++ getting started: classes.
Two new Intermediate tutorials about binary file access, C++ Style and C Stlye.
Welcome to tutorials.neonphog.com. This front page has a list of the languages I offer tutorials on. You will find a brief description of the language and why / under what circumstances you might want to use it. By following the links, you can find more detailed information, and how to get started.
When writing these tutorials, I have two audiences in mind. First are those who are already programmers who want to pick up a second language. Second are those who have never programmed before. You should be able to follow the tutorials if you have never programmed before. However, I am not going to hold back on any jargon or vocabulary. You should get used to seeing it in writing about programming. If you do not know what a word means, utilize your internet connection and look it up.
I am going to try to write a tutorial a week, or at least a section of a tutorial a week, starting with the more basic, moving to the advanced. Please check back here for updates.
C++ is my language of choice for applications that do not fit into a special niche provided by something like python or javascript.
C++ can be as high or low level, as object-oriented or as functional as you want. When people think of high-level languages, in my experience, what they are really thinking of are things like object-databases, garbage collectors, hash tables, and gui designers. All of these things can be a part of c++, if you wish them, in the form of open source libraries with generous licenses allowing for commercial development, especially now that Nokia is planning to release Qt under the LGPL.
In c++, you can write code that will compile and run on any system architecture, and being a truly open standard, your code will not be subject to the whims of any single organization.
It seems hard for people to get an accurate estimation of python. They either consider it pointless and miss out on what it can do, or go nuts writing things in python that really should not have been.
For writing single-user scripts and utilities, one-off scripts such as database imports, cgi or otherwise quick dynamic website applications, or proof-of-concept prototyping code, python is my programming language of choice. This website, for example, is published by a 121 line python script I wrote.
If your application really needs to be multi-threaded, or starts getting into thousands of lines of code, you should consider switching to a different language. Sure, python can do it, but it really is not the best choice.