Hi, I'm trying to create a program that when run ten times (closing inbetween) then throws up a message. My thoughts on this is to get my application to create a dat file storing 0 (Zero) in it, then have my application read the dat file for input each time it runs adding (++) to the dat file till ten runs. Thinking <fstream> get, to extract from dat file. ofstream outfile, ios::trunc, to write to file. All in a while loop. Looking at using string to int to covert on get (although I don't know how yet! or even if needed?) Now before I get to carried away I need someone to say "what the hell am I doing it this way for?" He should just (insert your expertise and advice here). Yes I'm a noob, hence this question, "Do I need to close my dat file inbetween my read/ write to it, ie get information, close file, open file again to write new data to it? No real code as yet, got my programs that get information from a file and one that writes to a file, while loops not a problem, string to int I'll work out or get back to you all. Now before I try putting it all together I thought I'd seek advice on is this the correct way to go about it?
Thanks in advance, Leppie