#119112 - nio101 - Mon Feb 19, 2007 8:59 pm
Hello friends,
I've tried to use C++ I/O functions to read a text file on my EZF4, and I get some random errors, sometimes 1 character coming from out of nowhere, sometimes some characters are lost...
I use the latests R20/libnds/libfat...
I do it that way :
And "buffer" doesn't always contain what it should !?!... If somebody can help...
BTW, I've tried the classic C-stdio way (fopen/getc/fclose), and it works well...
Thanks.
I've tried to use C++ I/O functions to read a text file on my EZF4, and I get some random errors, sometimes 1 character coming from out of nowhere, sometimes some characters are lost...
I use the latests R20/libnds/libfat...
I do it that way :
Code: |
#include <string>
#include <fstream> ifstream inputstream("test.sgf"); string buffer; while (!inputstream.eof()) { getline(inputstream, buffer,';'); iprintf("buff=.%s.",buffer.c_str()); } |
And "buffer" doesn't always contain what it should !?!... If somebody can help...
BTW, I've tried the classic C-stdio way (fopen/getc/fclose), and it works well...
Thanks.