// Reading a file
#include <iostream>
#include <fstream>
#include <string>
int main()
{
std::string line;
std::ifstream file("example.txt");
if(file.is_open())
{
while(getline(file, line))
{
std::cout << line << '
';
}
file.close();
}
else std::cout << "Unable to open file";
return 0;
}