Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / selfPrintingTask.cpp
blob: e26970758f551867bf7bf7e14707f1f6955634f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <fstream>

using namespace std;

const int MAX_SIZE = 1024;
int main()
{
	ifstream inputFile("selfPrintingTask.cpp");
	
	if (inputFile.fail())
	{
		cout << "Error!" << endl;
		return -1;
	}
	
	while (!inputFile.eof())
	{
		char buff[MAX_SIZE];
		inputFile.getline(buff, MAX_SIZE);
		cout << buff << endl;
	}


	return 0;
}