classdef.hpp
#pragma once
class BBase
{
public:
BBase() {}
};
class Base : public BBase
{
public:
Base() {}
};
class FirstDerived : public Base
{
public:
//FirstDerived(const Base<_Ty>& obj);
FirstDerived(const BBase& obj) {}
void test() {}
protected:
private:
};
class SecDerived : public Base
{
public:
SecDerived() {}
protected:
private:
};
main.cpp
#include <stdio.h>
#include "classdef.hpp"
int main(void)
{
printf("Hello world");
SecDerived SDObj;
FirstDerived FDObj(SDObj);
FDObj.test();
return 0;
}