Creating your own header file in C
foo.h #ifndef FOO_H_ /* Include guard */ #define FOO_H_ int foo(int x); /* An example function declaration */ #endif // FOO_H_ foo.c #include “foo.h” /* Include the header (not strictly necessary here) */ int foo(int x) /* Function definition */ { return x + 5; } main.c #include <stdio.h> #include “foo.h” /* Include the header … Read more