- 首先,我们先需要添加一个外壳,外壳的功能是:将c++的类的方法进行包装,形成类似C语言的库函数
我们需要建立一个.cpp文件和一个头文件,例如:
HBShell.cpp:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "HrvBike.h"
#include "HBShell.h"
hrvBikeInterface *pInterface = NULL;
//int isOk = 0;
void initHrvInterface() {
if (pInterface == NULL) {
pInterface = new hrvBikeInterface();
}
}
//hrvBike.calHrvParamsMain(spath, despath, age, gender);
void calHrvParamsMain(