-
data read zeros?
When I read in a data file that is being written to by another program, do I have to wait unitl it is done writing to display the data? Or could I display the data as it is being writen? Currently I can read a portion of the written file correctly, but it stops and prints out zeros when the data file is still being written to with valid data.
Code:
//program that is reading in
float input;
/*open data file*/
ifstream inFile("output");
//inFile.seekg(0,ios::cur);
inFile >> input;
while(!inFile.eof())
{
inFile >> input;
data.push_back(input); //vector
inFile >> input;
}
Thanks
-
Please don't double post, or both of your posts might get deleted. Just stick to this thread.
-
Sorry - I probably confused you when I moved the other post to this board. You can ask the questions on the other thread.