what I am needing to do is read a character from a file into a structure member. I thought it would be simple enough but fscanf, I guess just works for strings. I commented out tons of stuff and put a printf statement after every fscanf and the character line is where it falls apart. The preceding members are strings and after hours of testing everthing else I finally came to the conclusion the fscanf does not return anything that fits neatly into a char.
I was hoping to be able to continue using fscanf so as not to lose my place in the file.
fscanf(fout, "%s", struct_a.mem1);
fscanf(fout, "%s", struct_a.mem2);
fscanf(fout, "%s", struct_a.mem3);
fscanf(fout, "%c", struct_a.mem4); /*this is the line that's a problem*/
fscanf(fout, "%d", struct_a.mem5);/*haven't tested to this line yet either*/
Hopefully the preceding is enough to give you an idea of what I am doing without weighing the post down with a bunch of extra stuff.