Rev 340 | Blame | Last modification | View Log | RSS feed
#include <iostream>#include <gtkmm/main.h>#include "elevator_window.h"int main (int argc, char *argv[]){int numFloors = -1;int numElevators = -1;std::cout << "Enter the number of floors [2-10]: ";std::cin >> numFloors;std::cout << "Enter the number of elevators [1-5]: ";std::cin >> numElevators;if (numFloors < 2 || numFloors > 10){std::cerr << "Invalid number of floors" << std::endl;return 1;}if (numElevators < 1 || numElevators > 5){std::cerr << "Invalid number of elevators" << std::endl;return 2;}// Set up the controllerController c(10, 5);// Start GTKGtk::Main kit (argc, argv);// Create the windowElevator_Window window;// Set associationswindow.set_controller (&c);c.set_gui (&window);// Start the backendc.start_all_elevators ();// Start the GUIGtk::Main::run (window);return 0;}