Hi, i'm a bit lost by using C++.
I want to store the adresses of each instances of a classe in an array of pointers.
Here is a sample of what i'm trying to do :
This syntax doesn't work, he he it's a bit painful but I'm a noob
May someone help me ?
P.s: I hope that there are not too much mistakes in my english. (poor french)
I want to store the adresses of each instances of a classe in an array of pointers.
Here is a sample of what i'm trying to do :
Code:
class object{
...
};
main()
{
object **a_objects;
a_objects = new (* objet)[10];
objet myobject1();
a_objects[0] = &myobjet1;
objet myobject2();
a_objects[1] = &myobjet2;
...
}
May someone help me ?
P.s: I hope that there are not too much mistakes in my english. (poor french)