#include <iostream>
#include <cstring>
using namespace std;

class Parent{
public:
	Parent operator=(const Parent&) = delete;
	Parent(const Parent&) = delete;
	Parent() = default;
	Parent(int complex) : test(complex) {}

	virtual void func(){ cout << test; }
private:
	int test = 0;
};

class Child : public Parent{
public:
	Child operator=(const Child&) = delete;
	Child(const Child&) = delete;
    Child(const Parent* parent){
    	const auto vTablePtrSize = sizeof(void*);
    	
    	memcpy(reinterpret_cast<char*>(this) + vTablePtrSize,
    	       reinterpret_cast<const char*>(parent) + vTablePtrSize,
    	       sizeof(Parent) - vTablePtrSize);
	}

	virtual void func(){ cout << "Child, parent says: "; Parent::func(); }
};

int main() {
	Parent foo(13);
	Child bar(&foo);

	bar.func();

	return 0;
}