Im trying to create a vector of objects similar to an ArrayList in processing.
this is my code so far;
void testApp::update(){
for (int i = 0; i < numofparticles; i++) {
if (particles.size() > maxparticles){
break;
}
else {
particles.push_back(new particle(ofRandom(2,-2),ofRandom(2,-2)));
}
}
}
But im getting an error,
no matching function for call to ‘std::vector<particle, std::allocator >::push_back(particle*)’
any help would be great,
thanks
joss