In C, a header file declares constants, functions and structures. The header file can be referenced (using the #include statement) by many programs. When the Declaration Generator creates a declaration for a C program, it writes the declaration to a header file (.h file). It also generates a corresponding array of short data types to hold the null-indicator variable for each column in the table.
To create a C header file, start the Declaration Generator utility, then follow the steps below:
If you don't specify a path, the header file is written to the directory specified by the current application path (the application path is specified in the PATHS tab in Options).
If you specify a file that already exists, you are given the choice of appending to it or overwriting it at run time.
char emp_lname[15];
char emp_fname[10];
char emp_dept[12];
.
.
.
Remember to take into account C variable-naming guidelines when assigning a prefix. Do not assign one containing characters that are disallowed by the compiler or one that might make the variable name too long.
char emp_001[15];
char emp_002[10];
char emp_003[12];
.
.
.
.
.
.
double emp_payrate;
double emp_com;
} dcl_employee;
If you don't set Declare The Structure, the structure is written as a data-type definition. The name specified in the Structure field is assigned as the name of the data type, as shown in the following:
struct dcl_employee
{
short emp_ssn;
char emp_lname[11];
char emp_fname[11];
.
.
.