哪来的Hello类型?
test函数没有参数,但你调用的时候却传递了一个0,当然不对了啊
函数改为:
char *test()
{
return "hello";
}
main函数改为:
int main()
{
puts(test());
}
head.h文件中:
#include <stdio.h>
//Hello可能是一个类
class Hello
{
public:
void test();
protected:
private:
};
void test()
{
//书写函数
}
test.c文件中:
//上面跟你一样
//开始调用test函数