Hi. For some reason, the std::cout never prints a value, despite there being items in the .txt file I created. What am I doing wrong here? Thanks in advance!
First of all, calling the output stream 'dataFileIn' and the input stream 'dataFileOut' is pretty confusing.
The problem is, I think, that both streams point to the same file and std::ofstream by default truncates the file it opens, so by the time std::ifstream gets to it there's nothing in it anymore.
Open a different file for output.