Inheritance and constructor problem

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

You need to call the contructor of the Particles class but as it expects the arguments “ofPoint, float” you get the error message “Particles::Particles()” By default the inherited constructor gets called with no arguments.

You can call the Particles constructor like this when you create your Creature object via inheritance:

Creature::Creature():Particles(YourofPoint, Yourfloat){
    theta = 0;
    r = 10;
}

thnaks…