has been put into a variable. I need some advice or help on how to get the first two characters from what has been put into a variable using sscanf. I know it doesn't matter how the data was put there but I thought I would mention it anyway.
partial example of my code that works except what I need to do:
void main()
{
#define MAXLINE 128
FILE *fr;
char s5[10];
char line[MAXLINE];
if(fgets(line, MAXLINE, fr) != NULL) {
sccanf (line, "%6c", s5);
pId->Wx_Id = s5;
// Here is what I don't know how to do
pId->Temp = first 2 characters in s5
exit(0);
}
}
Thanks for your help!
Alexsis