From 3cde482692a7b96aa650cf809c222f758e10ac90 Mon Sep 17 00:00:00 2001 From: chrisheesh Date: Wed, 25 Sep 2024 11:22:08 -0700 Subject: [PATCH 1/3] closes #2 --- main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index f2ddce4..50f6909 100644 --- a/main.cpp +++ b/main.cpp @@ -14,14 +14,18 @@ int main(){ else{ cout << "What is your next favorite?\n"; } - cin >> input; + + std::getline(std::cin, input); + //cin >> input; list.push_back(input); }while( input != "done" ); + list.pop_back(); + 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 +} From f2922b1145f89081fee4a6879af36578505d16b7 Mon Sep 17 00:00:00 2001 From: chrisheesh Date: Wed, 25 Sep 2024 11:28:47 -0700 Subject: [PATCH 2/3] Create actions.yml closes #1 --- .github/workflows/actions.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/actions.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..1b89f78 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build project + run: g++ main.cpp --std=c++17 -o MyFave From c9f7845a9b51115431b454bf33cf2613b5a478b1 Mon Sep 17 00:00:00 2001 From: chrisheesh Date: Wed, 25 Sep 2024 11:32:30 -0700 Subject: [PATCH 3/3] Update README.md closes #1 with status badge --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 121b94d..92c52d3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +## "MyFave" | GitHub Actions (status badge) + +[![Build C++](https://github.com/chrisheesh/MyFave/actions/workflows/actions.yml/badge.svg)](https://github.com/chrisheesh/MyFave/actions/workflows/actions.yml) + + # MyFave This is a simple C++ command line application to maintain a list of your favorites.