1 Star 0 Fork 8

仕界X / TC275_illd_freertos_led_demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CppTest.cpp 552 Bytes
一键复制 编辑 原始数据 按行查看 历史
蛋蛋 提交于 2020-10-19 18:01 . 添加C++的支持
#include "CppTest.h"
ChildrenClass ChildrenClassInstance(7);
const ChildrenClass ConstInstance(9);
extern "C" void *ChildrenClassInstanceForC=(void *)&ChildrenClassInstance;
int BaseClass::CFileFuntion(int b)
{
return A-b;
}
int ChildrenClass::virtualFunction2(int b)
{
return A/b;
}
int g_CppValue=10;
extern "C" void CppTest(void *instaceForC)
{
BaseClass * p=static_cast<BaseClass *>(instaceForC);
g_CppValue=p->HFileFuntion(2);
g_CppValue=p->CFileFuntion(2);
g_CppValue=p->virtualFunction1(2);
g_CppValue=p->virtualFunction2(2);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shijie_x/tc275_illd_freertos_led_demo.git
git@gitee.com:shijie_x/tc275_illd_freertos_led_demo.git
shijie_x
tc275_illd_freertos_led_demo
TC275_illd_freertos_led_demo
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891