Accumulator A
07-30-2005, 11:31 AM
The title mostly says it all. I don't know if it's possible or not, but it seems like it should be so I tried it anyway.
The error I get is:
error:invalid use of template-name 'std::list' without an argument list
Relevant bits of code follow
using namespace std;
list<Particle> list1;
list<Particle>::iterator pit;
list createParticleExplosion(list<Particle>, int, float, float, float, float,float,float);
int main(void){
list1 = createParticleExplosion(list1, 20, 300, 250, 147, 7500,10,300);
}//end main
list createParticleExplosion(list &bro, int partamount, float posx, float posy, float changle, float speed,float decay, float lifetime){
//the function
}//end createParticleExplosion
I originally wanted this function to return void, but when I had it as void it was giving me the error "variable or field 'createParticleExplosion' declared void." Is it possible to have this function be void?
Also how would I handle passing the list iterator?
I'm sure I'm just messing up the syntax or something, but I couldn't find an answer via google, my various c++ books or comp.lang.c++.
Thanks!
The error I get is:
error:invalid use of template-name 'std::list' without an argument list
Relevant bits of code follow
using namespace std;
list<Particle> list1;
list<Particle>::iterator pit;
list createParticleExplosion(list<Particle>, int, float, float, float, float,float,float);
int main(void){
list1 = createParticleExplosion(list1, 20, 300, 250, 147, 7500,10,300);
}//end main
list createParticleExplosion(list &bro, int partamount, float posx, float posy, float changle, float speed,float decay, float lifetime){
//the function
}//end createParticleExplosion
I originally wanted this function to return void, but when I had it as void it was giving me the error "variable or field 'createParticleExplosion' declared void." Is it possible to have this function be void?
Also how would I handle passing the list iterator?
I'm sure I'm just messing up the syntax or something, but I couldn't find an answer via google, my various c++ books or comp.lang.c++.
Thanks!