here's the working code
here's the unicode version, which is pretty much exactly the same.Code:char a[16], b[16]; while (fscanf(file, "%s", a) != EOF && fscanf(file, "%s", b) != EOF) { // do stuff }
the text file i'm reading is very simple, something like this:Code:wchar_t a[16], b[16]; while (fwscanf(file, L"%s", a) != EOF && fwscanf(file, L"%s", b) != EOF) { // do stuff }
AAA A
BBB B
CCC C
the non-unicode will wrap around the parse the next line. the unicode version loops indefinitely the first line.
what am i doing wrong? thanks.



LinkBack URL
About LinkBacks




