int main(int argc, char* argv[]) { students.loadStudents(); std::cout << "Welcome to the student catalog thing" << std::endl; while (true) { std::cout << "Input a command:" << std::endl; std::string toPass = ""; std::getline(std::cin, toPass); if (toPass == "exit") { break; } ParseStringToCommand(toPass); } return 0; }
int _tmain(int argc, char* argv[]) { students.loadStudents(); std::cout << "Welcome to the student catalog thing" << std::endl; while (true) { std::cout << "Input a command:" << std::endl; std::string toPass = ""; std::getline(std::cin, toPass); if (toPass == "exit") { break; } switch (VerifyInputIntegrity(toPass)) { case None: ParseStringToCommand(toPass); break; case InvalidCharacter: std::cout << "Invalid chracter in input" << std::endl; break; case InvalidFormat: std::cout << "Invalid format detected" << std::endl; break; default: std::cout << "Unknown error" << std::endl; break; } } return 0; }