Use this as an example:
base class

//base.h
#ifndef BASE_H
#define BASE_H

class Base
{
    int foo;

public:
    Base(int number) : foo(number) {}
};

#endif

derived class

//derived.h
#ifndef DERIVED_H  //<- inclusion gaurding
#define DERIVED_H

#include "base.h"  //<- this adds the code from base.h to derived.h

class Derived : public Base
{
    int foobar;
public:
    Derived(int num1, int num2) : Base(num1), foobar(num2) {}
};

#endif

This is how your headers would look. Then in the .cpp files you would just need to include the .h that the .cpp file is named after.

base class .cpp file

//base.cpp
#include "base.h"

// all the code for the base class would go here

derived class .cpp file

//derived.cpp
#include "derived.cpp"

// all the code for the derived class would go here.

Edited 3 Years Ago by NathanOliver

This question has already been answered. Start a new discussion instead.