#include // include the library for reading and writing to and from files #include using namespace std; int main() { string line; // declare an ifstream named "inputfile" inputfile.open("data.txt"); while(/* use the inputfile.eof() function to determine when to go into the loop */) { // use the getline function to read in a line cout << line << endl; } // close input file return 0; }