How to init my particle constructor?
Hi! I have a class called _PARTICLE and i initialise the number of particles with the constructor:
_PARTICLE _Meteor(50); // 50 particles
What i want to do is create 10 meteors like that
_PARTICLE _Meteor[10](50);
But here i get an error, how can i do to create 10 _Meteor initialised with 50 particles?
Thanks
_PARTICLE _Meteor[50];
for (int i = 0; i < 50; i++)
{
_Meteor._PARTICLE(50);
}
I think this works.
Bye
for (int i = 0; i < 50; i++)
{
_Meteor._PARTICLE(50);
}
I think this works.
Bye
quote:Original post by _Rambo_
_PARTICLE _Meteor[50];
for (int i = 0; i < 50; i++)
{
_Meteor._PARTICLE(50);
}
I think this works.
Bye
You mean "_PARTICLE _Meteor[10];" ?
[edited by - Kurioes on October 19, 2002 10:05:27 AM]
I didn''t know you could actually do it like this (might not even be standard, dunno), it''s a bit of a pain and theres probably an easier way:
_PARTICLE _Meteor[10] = { _PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50),_PARTICLE(50)};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement