From 0c06192f8130e6a07b107970cc14b19e7a1b57d2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 17 Jul 2019 10:26:22 -0300 Subject: [PATCH] while loop in admin and exit --- main.cpp | 13 +++++++++++-- newParkManne.cpp | 5 +++++ test.db3 | Bin 16384 -> 16384 bytes 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 newParkManne.cpp diff --git a/main.cpp b/main.cpp index 596b79c..7b1b50d 100644 --- a/main.cpp +++ b/main.cpp @@ -47,8 +47,17 @@ int main() { // state of db: // er zijn 10 parkspots, 5 met biketype en 5 met pickup type // er is een customer met id 1(testcustomer) met password "password" - - interface(parking_spots); + while(true) { + cin.clear(); + interface(parking_spots); + cout<<"\nexit? Input 'y' or 'n'.."; + char n; + cin >> n; + cin.clear(); + if(n=='y'){ + break; + } + } } /* diff --git a/newParkManne.cpp b/newParkManne.cpp new file mode 100644 index 0000000..d1c3415 --- /dev/null +++ b/newParkManne.cpp @@ -0,0 +1,5 @@ +#include + +void say_hello(){ + std::cout << "Hello, from newParkManne!\n"; +} diff --git a/test.db3 b/test.db3 index e591386fa0f5dbcd250b2f914e0d97ad7408db94..b51c16a4b5c66261b2cff58666f6f8433ed40cca 100644 GIT binary patch delta 157 zcmZo@U~Fh$oFFa8&cMLH0>m)DGEv8vpPfOEF^ZSJnt_@3Is@;!@yU=-?Uj! xpn#9Nk&%&uLABAJQJHgcyL=@`Wz)pQ8lGl`8YT_~`9^m)DJW