Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit7a1e642cbec481959821ce486e69b96ad71e4ca0 (patch)
Author
 Angel Dimitriev <angel_dimitriev@abv.bg>
2022-03-01 20:47:22 +0200
Committer
 GitHub <noreply@github.com>
2022-03-01 20:47:22 +0200
Filesa0d94bc1281123eb7bcf86ac785ed6018c71446f
Object-oriented_programming_FMI-7a1e642cbec481959821ce486e69b96ad71e4ca0.tar
Object-oriented_programming_FMI-7a1e642cbec481959821ce486e69b96ad71e4ca0.tar.gz
Object-oriented_programming_FMI-7a1e642cbec481959821ce486e69b96ad71e4ca0.zip
Parent5b0fa6990b3174acaa4272e21370951d42559739 (diff)
Create task1.cpp
1 files changed, 26 insertions, 0 deletions
-rw-r--r--Sem. 02/task1.cpp26
diff --git a/Sem. 02/task1.cpp b/Sem. 02/task1.cpp
new file mode 100644
index 0000000..862cf07
--- /dev/null
+++ b/Sem. 02/task1.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;
+ }
+ inputFile.close()
+
+ return 0;
+}