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
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