1) How do I do a function that returns an array (not the pointer, the whole array):
I tried something like
int function()[]
{
int foo[5];
...
return foo;
}
then calling it with
but it doesnt seem to work.
2) Say I have a "Ragdoll" class that is composed by 10 "Balls". Now, I want every ball to have a pointer to the Ragdoll of which it's a part of.
So I would have
class Ragdoll
{
Ball balls[10];
};
class Ball
{
...
Ragdoll* ragdoll;
};
But the compiler does not like this, since the "Ball" class needs the ragdoll class to be defined and viceversa.
How should I do it?
Thanks.
Got a Mac? Check out my game at [a]http://www.radicalrebound.com[/a]