James posted:
I'm looking for some advice in teaching myself how to program.
I just finished reading O'Reilly's Practical C++ Programing. I can do
anything that was convered in the book very comfortably without
referring to the back. This is something I'm very interested in so I
spent several hours each night going through the exercise programs.
I'm curious where I should go from here. I'm interested in learning
how to create useful programs w/ GUIs on various platforms (Windows,
Mac OS, Linux). Ideally, I'd like to create a new email client and
address book for both Windows & Linux.
I'm currently using a Powerbook w/ XCode to develop these programs but
I have access to Windows. Is there any books you could suggest that
would be a continuation of what I already know and lead me towards
creating useful applications?
Thanks
James
Be very very very weary of Win32 programming with C++.
If you open up MS Visual C++ and let the wizard create the skeleton of a
Win32 GUI program for you, then you get provided with the most disgusting
code known to man. For instance, there are macros everywhere throughout the
windows header files. You also cannot include one particular windows header
file in a source file. For instance:
//blah.cpp
#include <winnt.h>
This won't compile. There's unrecognized words in "winnt.h". What in actual
fact is happening is that "winnt.h" is referring to stuff which was defined
in "windows.h". So shouldn't "winnt.h" include "windows.h"... ?
Another thing, you won't see:
static_cast
reinterpret_cast
in windows code, you'll see:
(BRUSH)5;
which is pretty disgusting in my own opinion.
I'm actually working on something at the moment... I created the Win32 GUI
project with the wizard, but now I'm re-organizing it. I'm not finished yet
though. It's starting to look nice, I've made use of namespaces, exceptions,
the new-style casts. Pretty much turning horrid C code into beautiful C++
code. If you'd like to compare the before and after, then I'll post it here.
As far as becoming very proficient in C++... well I would recommend posting
and reading here as often as you can. I've read ~4 C++ books, must I've
learned most and attained most clarity in this newsgroup.
-JKop