readFile - notdanik/cpputility GitHub Wiki

readFile

This function will print inputed file to the console. You are now able to do

readFile("text.txt");

instead of the long process with ifstream and a while cycle. If you are inputing the file using a variable, the variable ha to be string!

Example of usage:

string file;
printString("Enter name of the file you want to print to the console:");
cin >> file;
readFile(file);