diff --git a/templates/_folder_Lectures/_folder_Lecture 05/Handout - vectors/main.cpp b/templates/_folder_Lectures/_folder_Lecture 05/Handout - vectors/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65e3d748258ddc66919487dde51af5a75ad2fb3d --- /dev/null +++ b/templates/_folder_Lectures/_folder_Lecture 05/Handout - vectors/main.cpp @@ -0,0 +1,18 @@ +#include <iostream> + +int main() { + std::string todoList = "buy soap\nbuy rice\ndo laundry\naccidentally publish exam on blackboard\ninvent mind control device\nprepare world domination victory speech\ncall mom\n"; + std::string input; + while(true) { + std::cout << "? "; + getline(std::cin, input); + if(input == "quit") { + break; + } + todoList += input + '\n'; + std::cout << "--- TODO list ---" << std::endl; + std::cout << todoList << std::endl; + } + + return 0; +} \ No newline at end of file