M
muser
struct crecord {
char customercode[6];
}
crecord Newcrecord;
char temp1;
strncpy( Newcrecord.customercode, &temp1[1], 5 )
etc
if I have to perform a mathmatical equation on customercode, how would
I go about it.
if char customercode contain
customercode[0] = 1;
customercode[1] = 2;
I was told that to find its correct integer value, I would have to
minus 1 by 48, to get the digit 1.
could someone give me a list of char digits and their corresponding
value
i.e.
1 = 49;
2 = 48;
And if possible the code to achieve this.
e.g. Newcrecord.customercode[0] = 49 - 48;
char customercode[6];
}
crecord Newcrecord;
char temp1;
strncpy( Newcrecord.customercode, &temp1[1], 5 )
etc
if I have to perform a mathmatical equation on customercode, how would
I go about it.
if char customercode contain
customercode[0] = 1;
customercode[1] = 2;
I was told that to find its correct integer value, I would have to
minus 1 by 48, to get the digit 1.
could someone give me a list of char digits and their corresponding
value
i.e.
1 = 49;
2 = 48;
And if possible the code to achieve this.
e.g. Newcrecord.customercode[0] = 49 - 48;