Game Programming and Development Tools

Reply To: Why I don't like C++, yet I must push on.. – dartsman



Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
Well I tried to reply to that question, yet the server kept saying that there was some problem, I couldn't even start typing out the reply.

Luke: Have a look at "Static Member variables" and how to use them.

for the thing about '#include <list>' check out . Pretty much the STL containers all don't have '.h' as an extension. Reason told was that the non-extension headers are contained within a namespace, the .h ones are not, and then will be added to the global namespace.

I'm pretty sure with static member variables you need to do...

class Test
static int m_var;

int Test::m_var = 0;

C++ is great, if you learn it. "Industry Standard", Oh yeah, and for a good reason, actually several! As you can see I like C++ :P It's good to you if you treat it right you just need to give it a little love and it'll give you a little love. Though best if we don't get into a C++ vs Java battle, I have actually done some Java (J2ME), it's nice, but I'll always go back to C++.

"But it is God who judges: He brings one down, he exalts another." - Psalm 75:7