Why when I compile and run this code, does it always return an empty string, the sample txt file is written and saved with notepad and has over 300 lines of text, yet it iterates the while loop once and puts nothing to the console, setting a watch on "infileStr" showes it to be empty???
___________________________________________________
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
I am using Visual Studio, and I had the text file in the wrong directory, when it did not find it it created it (same file name) with zero bytes... once I put the file in the correct directory, it read it fine...
Sorry, hope this helps another newbe like me (thats why I left it posted and not deleted!