From 77c34e20b2a461b39f0cd6e66c08d4409b4b835c Mon Sep 17 00:00:00 2001 From: MassiveAtoms Date: Wed, 10 Jul 2019 05:48:42 -0300 Subject: [PATCH] fixed interfce.cpp/park(customer, vector) --- CMakeLists.txt | 2 +- Interface.cpp | 2 +- test.db3 | Bin 24576 -> 24576 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5f4121..35be24b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.11) +cmake_minimum_required(VERSION 3.10) project(park) set(CMAKE_CXX_STANDARD 11) diff --git a/Interface.cpp b/Interface.cpp index 0b15bf2..7054c03 100644 --- a/Interface.cpp +++ b/Interface.cpp @@ -145,7 +145,7 @@ void park(Customer& c, vector& spots) { cout << "The following spots[which can fit your vehicle] are " "available: "; for (Park_spot i : spots) { - if (i.v_type == c.vehicle) { + if (i.v_type == c.vehicle && !(i.taken)) { cout << i.id << ", "; } } diff --git a/test.db3 b/test.db3 index 823aad0c2b6da605f6f8e75f44726783fe734929..7fccadfae94c46f2430141c1100fa0275356adfc 100644 GIT binary patch delta 294 zcmYL@y-EX75QS&%-|h_?4%x7kLRLYxu<#W`+YoF7o1lfSklGX$mg)lt3M!UH>{L?Q zX=y38DeZIaT6p0wcfOf9Gt;?F=X$=P&Bf}jHjhWwgFe0_U}o`)cf8>nGkiX+)mJ#~ zcrSUSqy6E~bnO2>7%x$y4S_ML!9wyBgJX}Vk@n?z6-QCiSWFgO{78n0#RnF6#U&na ziU~Iz;-s5pqUuDf8E@P*MaZ~-X<$~Bt}QxE#oICUd_b?#6G!JvqW5gvlC#pbgU)!e jJ+eYxdiuxIk`>hEfcNo!`u9xhQ8-N|HMO&Tvt2I%TFW#) delta 108 zcmZoTz}Rqrae_1>|3n#QM*fWn3+06w7#P_2FEQ}{Kr|;SBbed^n!_Lf)cKTu;snt}4hjGucN5zH