Part of a program I am writing will look at a directory and generate a list of file paths for all files in that directory, including the files in its subdirectories. I am putting this information inside the aforementioned binary file with the wofstream like this:
Above, fullPathBuffer is a wchar_t array of size MAX_PATH.
Once all the file paths are written, I declare an int vector with the same size as the number of files found and shuffle it randomly. Now my plan is to read from the text file I just wrote randomly with a wifstream using random access to go through these files in random order. I'm trying to do it like this:
Above buffer is, again, a wchar_t array of size MAX_PATH. Can anyone see anything I'm doing wrong? What I want is to read in a segment equivalent to a full file path each time I read, regardless of how long the file path actually is.