的main.c中会是这个样子:
// bring in the prototypes and typedefs defined in 'another'
#include "another.h"
int main(int argc, char *argv[])
{
int some_value = 1;
// call a function that is implemented in 'another'
some_another_function(some_value);
some_another_function1(some_value);
return 1;
}
的another.h应包含another.c文件中找到的类型定义和功能函数原型:
// add your typdefs here
// all the prototypes of public functions found in another.c file
some_another_function(int some_value);
some_another_function1(int some_value);
的another.c应包含another.h找到的所有函数原型的功能实现:
// the implementation of the some_another_function
void some_another_function(int some_value)
{
//....
}
// the implementation of the some_another_function1
void some_another_function1(int some_value)
{
//....
}
你的意思是'#include'?听起来你应该在课堂上多听! – John3136
她从来没有在课堂上讲过,实验室的TA拒绝帮助我,因为我不想学习如何在Linux中编写代码。我试过#include another.c没有工作,我尝试了gcc another.c –
那么为什么你用“so”开始语句?那么你为什么不把句子的第一个字母和“我”的大写?所以请至少和潜在的雇主一样对待我们。 –