Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / task1.cpp
blob: 2a6e69e2b203cd37f6dd20ebbd65fc8965c23989 (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.open())
	{
		cout << "Error!" << endl;
		return -1;
	}
	
	while (!inputFile.eof())
	{
		char buff[MAX_SIZE];
		inputFile.getline(buff, MAX_SIZE);
		cout << buff << endl;
	}
        inputFile.close()

	return 0;
}