CppGeek
Practical, Pragmatic, C++-
C++ Standard Alphabet Soup
Posted on April 20th, 2009 No commentsC and C++ are international standards. So if you want, you can visit www.iso.org where they’ll be happy to charge way too much for a copy of the standard. It’s best to let your employer pick up the cost of this.
There are some alternate places where you can obtain draft copies of the standard, if not the standard itself.
www.open-std.org hosts a set of organisations working on various programming language standards. The two of interest to us would be ISO/IEC JTC1/SC22 WG14 and ISO/IEC JTC1/SC22 WG21, who produce the standards ISO/IEC 9899:1999 and ISO/IEC 14882:2003 respectively. In laymans terms: the two groups of guys who make the C and C++ standards.
-
Beginning C++ 3, Setting up your Development Tree
Posted on April 19th, 2009 No commentsSetting up your Development Tree
Your development tree is basically the directory structure that holds your source code, it can be as big and as elaborate as you like however it should have only one root.
Before you rush in and start programming, it’s a good idea to think about where your development tree should be. I believe it is best to put your development tree in a user readable/writable part of your directory hierarchy. The most obvious place to put it, is under the “My Documents” folder for your user. If you put it anywhere else, you need to remember you will need to adjust the permissions of the tree so that all the users who need to use it have access.
The form your development tree should take is a vast topic, with many variations possible. Here are a few simple guidelines to follow while working on your development tree.
-
Beginning C++ 2, Creating the Build Environment
Posted on April 18th, 2009 No commentsCreating the Build Environment
In this article I’ll describe how to setup the Visual C++ 2008 build environment on the Windows platform.
Windows Platforms and the SDK
The simplest Windows build environment consists of just the operating system and the freely downloadable platform SDK. The platform SDK consists of all the header files, library files, debug files (pdbs) that are needed to develop applications on Windows. It also comes with the compilers and linkers needed to compile any of C++ or C# programs you might create. However it lacks a User Interface for development so you would have to do all your development with the command prompt and a text editor.An alternative free windows platform is to use Visual Studio C++ Express Edition. This package includes a slightly older version of the platform SDK but it has the excellent Visual Studio Integrated Development Environment (IDE) packaged in with it.
-
Beginning C++ 1, Setting up the Platform
Posted on April 16th, 2009 No commentsSetting up the Platform
In this article I’ll be covering the prerequisites for setting up windows to be developer friendly
As you probably already know, you can build C++ programs on many, many platforms. The one I’ll be concentrating on here will be the Microsoft Windows platform (Windows XP upwards) using the Visual C++ 2008 compiler and the Boost library build environment
It’s debatable where the platform ends and the build environment begins. Traditionally the platform is a combination of the operating system and the hardware architecture. The build environment is the combination of the compiler and various libraries. The compiler and the libraries you use can have a significant effect on the nature of the language and your code. I’ll expand more on this in later articles.
-
Header Files
Posted on March 21st, 2009 1 commentThe physical design of a project is a vast topic, I think it will be useful to suggest some simple practices that will help point you in the right direction when you are just starting a project. They can also be applied to a large project but more care is needed.
The first things you can do:
- Make all headers standalone
- Keep your classes in seperateĀ .hpp and .cpp pairs, aim for one class per file.
- Use precompiled headers as an optimisation technique and nothing more.
- Don’tĀ put using namespace in any of your header files, you’ll pollute the namespace.
- Be careful of templates and where they are defined.
-
Physical Design
Posted on March 18th, 2009 No commentsOne of the most important but underrated aspects of a large C++ project is its physical design. The logical design could be the most beautiful thing in the world, yet the physical design can still slow your builds down and generate confusion in a project. You could for instance “modularise” a project by separating it into several DLL’s but still have it heavily coupled due to poorly defined and implemented interfaces.
More often a poor physical design reflects a poor logical design.
What is the physical design?
The physical design consists of all the physical aspects of the project
- The physical files and directories of the project.
- How they are divided into modules or libraries.
- The dependencies between the files and modules.
-
First Post
Posted on March 17th, 2009 No commentsThis is the first post!
I have a filing cabinet full of goodness that I can’t wait to share with you.
More to come…


