F
Feanor
I am running this in a small loop:
char charStock[3] = {recBuff[37],
recBuff[38], recBuff[39]};
for(i=0; i<3; i++) printf("%c", charStock);
record.numInStock = atoi(charStock);
printf(" %d\n", record.numInStock);
the printf returns this:
002 228
012 1212
021 2127
030 3003
009 901
014 1417
009 904
024 2415
031 3111
123 12304
022 2220
242 24228
015 1529
001 114
987 98704
011 1113
020 2005
001 122
002 206
000 24
000 25
000 10
048 4809
000 6
000 8
000 26
999 99928
....what? Help would be appreciated.
char charStock[3] = {recBuff[37],
recBuff[38], recBuff[39]};
for(i=0; i<3; i++) printf("%c", charStock);
record.numInStock = atoi(charStock);
printf(" %d\n", record.numInStock);
the printf returns this:
002 228
012 1212
021 2127
030 3003
009 901
014 1417
009 904
024 2415
031 3111
123 12304
022 2220
242 24228
015 1529
001 114
987 98704
011 1113
020 2005
001 122
002 206
000 24
000 25
000 10
048 4809
000 6
000 8
000 26
999 99928
....what? Help would be appreciated.