Code:
struct FLIGHT
{
long flightnum;
long Date;
char departcode
};
InitializeFlight(struct FLIGHT, int);
int main()
{
struct FLIGHT numof[5];
InitializeFlight( numof , ( sizeof( numof ) / sizeof( numof[0]) ) )
...
return 0;
}
InitializeFlight(struct FLIGHT fl, int size)
{
for(int i=0;i < size; i++)
{
fl[i].flightnum = 1111;
fl[i].Date = 2222;
fl[i].departcode = 'x';
}
}
This is more or less what you want but you are likely wanting to initalize the structure with data from a datafile. Anyways this is the format. I used some code from the other suggestions.