These are questions about C++ Style and Technique that people ask me often. If you have better questions or comments on the answers, feel free to email me (bs@research.att.com). Please remember that I can’t spend all of my time improving my homepages.
The definitions/explanations of individual terms are necessarily very brief. To compensate, each entry includes one or more references to The C++ Programming language (Special Edition) (TC++PL) where you can find more comprehensive explanations and code examples. I use section references, rather than page numbers, so that this glossary can be used together with translations of my books. It is always wise to read a whole section rather than trying to glean information from a few semi-random sentences.
This file should enable the reader to examine running ObjC-Programs using GNU Objective-C and gdb on non-NeXT-Machines. The examples are tested with gcc-2.6.3 and gdb-4.13.
Suggestions are welcome.
Objective-C is a powerful, easy-to-learn, object-oriented extension to C. Unlike in C++, advanced object-oriented features like dynamic binding, run-time type identification, and persistence are standard features in Objective-C which apply universally and work well together. Moreover, the support for descriptive message names (a la SmallTalk) makes Objective-C code easy to read and understand. Objective-C is supported by the GNU and NeXTSTEP C compilers.
Object-oriented programming, like most interesting new developments, builds on some old ideas, extends them, and puts them together in novel ways. The result is many-faceted and a clear step forward for the art of programming. An object-oriented approach makes programs more intuitive to design, faster to develop, more amenable to modifications, and easier to understand. It leads not only to new ways of constructing programs, but also to new ways of conceiving the programming task.
void assert(int expression); NDEBUG is defined where <assert.h> is included.) If expression equals zero, message printed on stderr and abort called to terminate execution. Source filename and line number in message are from preprocessor macros __FILE__ and __LINE__. One of the problems with developed programs, is that they tend to grow larger and larger, bringing up overall compilation and linking time to a large figure, and polluting out makefile, and the directory where we placed the source files. The first time a program we write reaches this state, is normally when we look for a different way to manage our projects.
This document tries to give the reader basic knowledge in compiling C and C++ programs on a Unix system. If you’ve no knowledge as to how to compile C programs under Unix (for instance, you did that until now on other operating systems), you’d better read this tutorial first, and then write a few programs before you try to get to gdb, makefiles or C libraries.
In order to use Solaris and most other Unix Systems you will need to be familiar with the Common Desktop Environment (CDE). Before embarking on learning C with briefly introduce the main features of the CDE.
This document has evolved over time and contains a number of the best ways to hand-optimise your C-code. Compilers are good, but they can’t do everything, and here I hope to help you squeeze the best performance out of your code. This is not intended for beginners, but for more experienced programmers.