GLOGIC 20 a écrit : > Hey David > Thanks for the quick reply.. i ended up getting the it sorted in the end. > you were right the problem was that they were in the same function. i was > trying to use outfile for both input and output to the text file and it > didnt like that one bit!. once i put thme in separate functions it worked > perfect >
Goog, the problem was probably after your last << operation. OutFile is in a fail state. Try : OutFile.clear() before re-open it. to write back your top ten. (I think Tamas Marki help me on a related point one day) > i dont know what std::string? ill check it out later > The int score was me being lazy and leaving out the i :) i fixed that too > and once angain dont know what std::vector is but will look into it later > once i get the coffee refil > It is a matter of taster but prefixing name with their type is probably not a good idea. > i also changed the fstream to ifstream and ostream. i presume using them > makes it more efficent or why is it better the using fstream? > thanks again for the help i was going mad I don't think this is more efficient, may be only more clear on your fstream use. Regards, David.
