We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0cb3949 + b88fb0a commit 22cc983Copy full SHA for 22cc983
todo.cpp
@@ -0,0 +1,17 @@
1
+#include <iostream>
2
+#include <vector>
3
+int main() {
4
+ std::vector<std::string> tasks;
5
+ while (true) {
6
+ std::string task;
7
+ std::cout << "Add a task (or 'q' to quit): ";
8
+ std::cin >> task;
9
+ if (task == "q") break;
10
+ tasks.push_back(task);
11
+ }
12
+ std::cout << "Tasks:\n";
13
+ for (const std::string& task : tasks) {
14
+ std::cout << task << "\n";
15
16
+ return 0;
17
+}
0 commit comments