Thanks God indeed, and thanks God that I also program in C++, but it's always interesting to learn new C/C++ features... and the more I learn C the more I learn C++ and do good C++ programs.
This reminds me of a time when I resolved to add classes to BBC BASIC. I was 14 so I didn't even get beyond POD but oh well... Now I've left that school, I need never touch the horrible little language again =P
EDIT: That technique actually doesn't look so bad, but of course this:
It is not possible, at least it is not easy, to inherit from another class. What can be done is to create the same functions in the new class that will call the functions of the other one, and it is useful to have an object of the base class as an attribute of the new one.
is a serious problem. Even if there is a work around, you need virtual functions for proper inheritance!
Out of historical interest, the first C++ "compiler", CFront, actually worked by turning C++ into (hideous) C code, which was then compiled with a C compiler.
Yeah - I know that all too well from when I used to start C++ books and not get very far, and then start them again a few months later. By the time I'd finished, I'd read the history sections a lot...
When I wanted to try and convert C++ code into BASIC (again, a dead end overambitious project I conceived when I young and naive :o), I even called the program bbcfront =P
Out of historical interest, the first C++ "compiler", CFront, actually worked by turning C++ into (hideous) C code, which was then compiled with a C compiler.
The Comeau C++ compiler still does this. And the Vala compiler (language similar to C#, made specifically for Gnome development), translates to C then compiles with gcc.