diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..f2ddce4 --- /dev/null +++ b/main.cpp @@ -0,0 +1,27 @@ +#include +#include + +using std::cout, std::cin, std::endl, std::string, std::vector; + +int main(){ + string input = ""; + vector list; + + do{ + if( list.size() == 0 ){ + cout << "What is your favorite?\n"; + } + else{ + cout << "What is your next favorite?\n"; + } + cin >> input; + list.push_back(input); + }while( input != "done" ); + + cout << "Your favorite list:\n"; + for(int i = 0; i < list.size(); i++){ + cout << list.at(i) << endl; + } + + return 0; +} \ No newline at end of file diff --git a/test_runner.sh b/test_runner.sh new file mode 100755 index 0000000..d9fb49a --- /dev/null +++ b/test_runner.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +g++ main.cpp --std=c++17 -o MyFave +./MyFave \ No newline at end of file