hello world…
i am working for the first time with inheratance so i have a matching function problem.
the base class is this:
#pragma once
#include "ofMain.h"
class Particles{
public:
Particles(ofPoint, float);
void applyForce(const ofPoint &);
ofPoint attraction(const Particles &);
void update();
void drawParticles();
private:
ofPoint loc,
vel,
acc;
float mass,
G;
};
and the derivate class this:
#pragma once
#include "ofMain.h"
#include "Particles.h"
class Creature : public Particles{
public:
Creature();
ofPoint getAverage(const vector<Particles>&) const;
void drawCreature();
private:
float theta,
r;
};
the compiler prints the flowing error: no matchin function for call to ‘Particles::Particles()’ on the Creature Constructor that i wrote in this way
#include "Creature.h"
Creature::Creature(){
theta = 0;
r = 10;
}
what is the problem?
thanks