Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / selfPrintingTask.cpp
blob: 862cf078be8d3837a9f96012550d007e604fb93c (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;
	}
        inputFile.close()

	return 0;
}