0

how to make header file by using user define function?

full process of making header files .

22nd Oct 2018, 9:30 AM
VEERESH MAURYA
VEERESH MAURYA - avatar
1 Respuesta
+ 2
First, SoloLearn playground doesn't support multiple files in a progran so you can't do it here. Normally, you enclose the source with an if statement so it can be included many times yet only generate a single set of definitions. The definitions are sorted in sections: constants, types, variables, and functions. The following lines could be in myheader.h: #ifndef _MYHEADER_H #define _MYHEADER_H 1 #define MYCONST 5 typedef struct {int a; int b;} mytype; extern mytype myvariable; extern int myfunction(mytype parameter); #endif /* myheader.h */
22nd Oct 2018, 10:00 PM
John Wells
John Wells - avatar