- Joined
- Nov 25, 2007
- Messages
- 1,667
- Reaction score
- 19
- Points
- 38
- Location
- Germany
- Website
- www.enderspace.de
- Preferred Pronouns
- Can't you smell my T levels?
AFAIK, C++ can be also used for writing a managed code (.NET, Mono), like what C# is used for, but there are some constraints if it's used for it. I've never tried it, and I don't know if it produces byte-code in that case.
You can use [ame="http://en.wikipedia.org/wiki/Auto_ptr"]auto pointers[/ame] in C++ which can make your code "managed" if you want.
Conditional compilation:
Balance is the key for conditional compilation. For example I can use the same code for both OpenGL and SDL_gfx based versions of my game. There's actually no other option if I want to make the game portable for some platforms having no OpenGL libraries.
Conditional compilation and macros also let me maintain both versions of Launch MFD - 2006 and 2010 in one code base until we get the 201x release.
These are the only moments when I find it justified to use the CC in My code though. It also helps in translations, but they could be done using other methods as well (gettext for example).
Last edited: