Hi,
i use an array af class object like the follow but i'm misunderstanding something...
if i write
Cnet *R[100];
for(int i=0; i<100; i++)
{
R = new CNeuralNet;
}
and then inside the destructor
for(int i=0; i<100; i++)
{
delete R;
}
it works fine and when i call the object
r->....
infact i don't get any error...
but if i write
Cnet *R;
R = new CNeuralNet [100];
and then inside the destructor
delete[] R;
i get errors when i call the functions inside the class i created
r->....
the error is :
error C2819: type 'Cnet' does not have an overloaded member 'operator ->'
: see declaration of 'Cnet'
Where is the problem?
thanks
D.
i use an array af class object like the follow but i'm misunderstanding something...
if i write
Cnet *R[100];
for(int i=0; i<100; i++)
{
R = new CNeuralNet;
}
and then inside the destructor
for(int i=0; i<100; i++)
{
delete R;
}
it works fine and when i call the object
r->....
infact i don't get any error...
but if i write
Cnet *R;
R = new CNeuralNet [100];
and then inside the destructor
delete[] R;
i get errors when i call the functions inside the class i created
r->....
the error is :
error C2819: type 'Cnet' does not have an overloaded member 'operator ->'
: see declaration of 'Cnet'
Where is the problem?
thanks
D.