How to invoke function from external .c file in C?

前端 未结 8 1832
清酒与你
清酒与你 2020-12-23 19:31

My files are

// main.c  

#include \"add.c\"

int main(void) {
    int result = add(5,6);
    printf(\"%d\\n\", result);
}  

and

         


        
8条回答
  •  盖世英雄少女心
    2020-12-23 20:15

    make a file classAusiliaria.h and in there provide your method signatures.

    Now instead of including the .c file include this .h file.

提交回复
热议问题