05-29-2013, 05:59 PM
Hey, me again ._.
This time i got a lil problem when it comes to read some chars.
Im atm trying to read the itemname file to get used of visual c++ express, but using the read function of fstream doesnt seem to work.
Heres the thing: i got a char defined somewhere in my code (without length, since i apparently cant set a var as length). Then im trying to read it with:
file.read((char*)&name, name_len)
With name_len being read right before that. But it seems like it"s somehow bypassing this after the 4th or 5th record, and wont go further in the file.
Therefore, when i use seekp to skip the number of chars set by name_len, the program keeps reading the file til the end.
Any idea about what im doing wrong here?
Thanks!

