// Read times table from the file we created before.
// By DreamVB 17:52 02/11/2016

#include <iostream>
#include <fstream>

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	char *lzout = "C:\\Test\\tables.txt";
	char buffer[80];

	//Write 6 times table to the file.
	ifstream fs;
	fs.open(lzout,ios::in);

	//Check if file was opened.
	if (!fs){
		cout << "Cannot open source file." << endl;
		exit(1);
	}
	
	//Read and display the file.
	while (!fs.eof()){
		//Read line
		fs.getline(buffer, 80);
		//Write line
		if (strlen(buffer))
			cout << buffer << endl;
	}

	//Close the file.
	fs.close();

	system("pause");
	return 0;
}