i have been trying to upload a txt file .
and it worked for the first time .
but then i changed the text using notepad , not with the studio .
but then it won't upload .
it gives me an assertion alert .
it says expression - (stream !=null)
i don't know why it happens .
i think maybe it has something to do with the encoding that you save the notepad file .
but nonetheless , if i write something that has more then 10 chars , it doesn't work .
so if anyone has anther idea ...
I don't think it is to do with the /n thing, because in mine before saving data from the file I count the lines, (which I've just realised I don't need to do) and I put in a test line afterwards: cout << linecount << endl;
so I know it is reading the lines correctly
Also, on mine, the problem doesn't seem to be to do with the size of the file, since I've had errors occur on files with content such as "1, fish, 1.2, 56, blur" and not occur when I've used bigger files...
After some investigation, I have discovered that one of the problems I have encountered (
Unhandled exception at 0x773242eb in Game.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0026fa44..
) is to do with the program trying to read data that isn't there.
thank you all , but i figured it out already .
the problem was the location of the file and the encoding .
i solved it by simpley opening a new text file from the visual studio itself .
and then edited the chras inside as i please .
works like a charm ...