File stream is great for reading data to and from files,. Mainly because it always makes sure to close the file when the object goes out of scope, which means that we don’t need to remember to call close(), but also because it makes it possible to parse the contents of the file.
Sometimes we don’t want to parse the contents but just read the data one line at a time.
while (std::getline(inputFile, line))
// line now contains the contents of one entire line.
// Do what you need to do here...