Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ofstream

Status
Not open for further replies.

tokra

Technical User
Feb 20, 2003
45
0
0
GB
I am trying to write a program to verify that a hard drive can store data without corrupting it.
I have written a class called randomData that is filled with a std::vector of 1k std::strings. The program prompts you for how big you want to make the class and then how times you want to repeat the class in the file. It then writes out the contents of the vector over and over again until the requisite space has been used. The data is read back in and checked to make sure it is what was written.
The program works fine for test cases like using 10 classes at 10 MB apiece, but when I increase the size, partway through the file newline charachters aren't beeing written occasionally. There is no discernable pattern.

My question does ofstream have issues with writing a large continous stream of data? If so what are the workarounds?

WR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top