I have a structure declared in a header file, and its initialized in the header file too.
struct rectype{
char out_storenum[100];
unsigned int out_usrcode;
unsigned int out_strngtyp;
char out_bit0_ind[5];
char out_bit1_ind[5];
char out_bit2_ind[5];
char out_bit3_ind[5];
char out_bit4_ind[5];
char out_bit5_ind[5];
char filename[200];
};
struct out_rectype out_record[50000];
I am using the structure in a loop to insert data. Now when I'm coming back in the loop and inserting data in the structure member, its getting over written. the code is running file, but when the array index is reaching around 40,000 - 45,000 some junk values is setting in the character fields.
I need to reinitialize the array structure. Can anyone help / advice me..
Thanks
Sourav M.
struct rectype{
char out_storenum[100];
unsigned int out_usrcode;
unsigned int out_strngtyp;
char out_bit0_ind[5];
char out_bit1_ind[5];
char out_bit2_ind[5];
char out_bit3_ind[5];
char out_bit4_ind[5];
char out_bit5_ind[5];
char filename[200];
};
struct out_rectype out_record[50000];
I am using the structure in a loop to insert data. Now when I'm coming back in the loop and inserting data in the structure member, its getting over written. the code is running file, but when the array index is reaching around 40,000 - 45,000 some junk values is setting in the character fields.
I need to reinitialize the array structure. Can anyone help / advice me..
Thanks
Sourav M.
Comment