👩💻 Join our community of thousands of amazing developers!
keywords:C++ 非静态成员函数作为回调函数并实现继承多态 Base.hpp #pragma once class Base { public: virtual void TestFun1(int Param) {} virtual void TestFun2(int Param) {} }; Child.hpp #pragma once #include <iostream> #include "Base.hpp" class Child : public Base { public: void TestFun1(int Param) override { printf("Fun1 : %d\n", Param); } void TestFun2(int Param) override { printf("Fun2 : %d\n", Param); } }; EventManager.h // Fill out your copyright notice in the Description page of Project Settings....