for the following code:
strncpy(temp_is sue, &temp1[13], 4);
files.rec1.issu e_rec[4] = atol(temp_issue );
cout<<files.rec 1.issue_rec[4]<<endl;
on execution I get the following.
0x0fd10
a memory address no doubt.
but when doing the following:
strncpy(temp_cu stomer_code1, &temp1[2], 5);
files.rec1.cust omer_code[5] = '\0';
files.rec1.cust omer_code[5] = atol(temp_custo mer_code1);
cout<< files.rec1.cust omer_code[5] <<endl;
I get a sensible
98581.
Have I gone out of bounds at all. Anyone who thinks they can solve
this mystery please respond. Real solutions please, as Bull****
doesn't get me anywhere.
strncpy(temp_is sue, &temp1[13], 4);
files.rec1.issu e_rec[4] = atol(temp_issue );
cout<<files.rec 1.issue_rec[4]<<endl;
on execution I get the following.
0x0fd10
a memory address no doubt.
but when doing the following:
strncpy(temp_cu stomer_code1, &temp1[2], 5);
files.rec1.cust omer_code[5] = '\0';
files.rec1.cust omer_code[5] = atol(temp_custo mer_code1);
cout<< files.rec1.cust omer_code[5] <<endl;
I get a sensible
98581.
Have I gone out of bounds at all. Anyone who thinks they can solve
this mystery please respond. Real solutions please, as Bull****
doesn't get me anywhere.
Comment