From 3588538108e2780bf5350cc289cb3b0671d48b0c Mon Sep 17 00:00:00 2001 From: eddy marinez Date: Wed, 14 Mar 2018 20:35:07 +0000 Subject: [PATCH] thing --- Student.cpp | 4 ++++ Student.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Student.cpp b/Student.cpp index 5bb2700..998fa74 100644 --- a/Student.cpp +++ b/Student.cpp @@ -48,6 +48,7 @@ void Student::displayMenu(){ break; case 2: // Log Out cout << "Goodbye." << endl; + studentMenuActive =0; break; /* Can you have something here that will cause the program to exit the menu when they choose logout? This can be done with a boolean return type for this function (returns true until they choose to logout, then it returns false) Or with a separate function like Andrew did in Teacher (you can check his code for a template). @@ -140,3 +141,6 @@ void Student::setLevel(int levelIn) { void Student::setUserName(string userNameIn) { userName = userNameIn; } +const bool Student::getMenuActive() { + return studentMenuActive; +} \ No newline at end of file diff --git a/Student.h b/Student.h index 4dd17be..3c0257a 100644 --- a/Student.h +++ b/Student.h @@ -46,6 +46,7 @@ class Student { void setUserName(string userNameIn); private: + bool studentMenuActive = 1; string userName; int level = 1; Questions questionAsk; -- GitLab