If you are using an input file stream (ifstream), you must associate that stream with a specific disk file. ... The getline member function is similar to the get function.
msdn.microsoft.com