Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / selfPrintingTask.cpp
diff options
context:
space:
mode:
Commit51f517bf92ce0aa616de37dd73074ce3e3579875 (patch)
Author
 Angeld55 <angel_dimitriev@abv.bg>
2021-03-05 14:39:17 +0200
Committer
 Angeld55 <angel_dimitriev@abv.bg>
2021-03-05 14:39:17 +0200
Files7ebbc2e009dbded38e10eae4a652a15596010a29 /Sem. 02/selfPrintingTask.cpp
Object-oriented_programming_FMI-51f517bf92ce0aa616de37dd73074ce3e3579875.tar
Object-oriented_programming_FMI-51f517bf92ce0aa616de37dd73074ce3e3579875.tar.gz
Object-oriented_programming_FMI-51f517bf92ce0aa616de37dd73074ce3e3579875.zip
Parent1f500f0eff09b834d7f863282874038213e4c329 (diff)
sem 2
1 files changed, 26 insertions, 0 deletions
-rw-r--r--Sem. 02/selfPrintingTask.cpp26
diff --git a/Sem. 02/selfPrintingTask.cpp b/Sem. 02/selfPrintingTask.cpp
new file mode 100644
index 0000000..e269707
--- /dev/null
+++ b/Sem. 02/selfPrintingTask.cpp
@@ -0,0 +1,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;
+} \ No newline at end of file