Loops and functions.Originally Posted by lilhawk2892
For example, write a print stat function for whenever you need to print the stats.
Or for a more OO aproach, make the stats a class, and have a print meathod.
Loops and functions.Originally Posted by lilhawk2892
For example, write a print stat function for whenever you need to print the stats.
Or for a more OO aproach, make the stats a class, and have a print meathod.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
Or overload the << operator.Something along these lines. I haven't done this in a while.Code:class myClass { public: std::ostream& operator << (std::ostream& os, myClass& mc) { os << a << ' ' << b << std::endl; return os; } private: int a, b; };
eh? WTF are you talking about? the 80/20 rule states that 80% of the execution time will be spent in 20% of the code (although in reality it's often closer to 90/10).Originally Posted by citizen
"I saw a sign that said 'Drink Canada Dry', so I started"
-- Brendan Behan
Free Compiler: Visual C++ 2005 Express
If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?
The 80/20 rule has many applications, but I bended the principle to say what I wanted to say. I explained what I was talking about. And 90/10 is improper.
edit: I dp not intentionally give wrong advice. I'm wrong a lot. However, I simply have to explain things in a different way because thinking is hard.
Last edited by whiteflags; 07-05-2006 at 10:52 PM.
>citizen:
errr its ok i didnt understand it anyways...
>mario.f:
thank you i didnt even think about that even though ive been using functions for everything else...ill make that
oh and im already up to 124 lines in about 1 minute of the game running lol.i expect easily a couple thousand XD