Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 1 insertions, 2 deletions
-rw-r--r--src/ConsoleInterface/Toolbox.cpp1
-rw-r--r--src/VenueConsoleUI.cpp2
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp
index d31aa91..fbc7806 100644
--- a/src/ConsoleInterface/Toolbox.cpp
+++ b/src/ConsoleInterface/Toolbox.cpp
@@ -16,6 +16,7 @@ void _printInputBoxLabel(const char* label) {
void inputLineBox(const char* label, char* output, unsigned maxWidth) {
_printInputBoxLabel(label);
+ std::cin.ignore();
std::cin.getline(output, maxWidth);
}
diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp
index 9efafb9..da5d3f4 100644
--- a/src/VenueConsoleUI.cpp
+++ b/src/VenueConsoleUI.cpp
@@ -38,7 +38,6 @@ void command_freeSeats() {
void command_reserveTicket() {
char name[MAX_LINE_WIDTH];
inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH);
- std::cin.ignore();
Date date;
inputBox("Enter event date: ", &date);
char password[PASSWORD_LEN];
@@ -77,7 +76,6 @@ void command_createEvent() {
char name[MAX_LINE_WIDTH];
inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH);
- std::cin.ignore();
Date date;
inputBox("Enter event date and time: ", &date);