void main() { setlocale(LC_ALL, ""); ConsoleMenu menu; menu.Run(); }
void main(int argc, _TCHAR* argv[]) { if (argc == 2){ string parametre = argv[1]; if (parametre == "-auteur" || parametre == "-a"){ cout << "[Vos noms], tout droit réservé, 2013." << endl; return; } } ConsoleMenu myConsoleMenu; myConsoleMenu.Run(); }
int main() { ConsoleMenu menu; menu.setTytul("Menu glowne"); menu.AddOption("Opcja 1", funkcja1); ConsoleMenu Podmenu; Podmenu.setTytul("Podmenu"); Podmenu.AddOption("Opcja 1", funkcja1); Podmenu.AddOption("Wyjscie", funkcjaExit); //menu.AddSubMenu("podmenu", Podmenu); menu.AddSubMenu("podmenu", &Podmenu); menu.AddOption("wyjscie", funkcjaExit); menu.Show(); //system("pause>nul"); return 0; }
void TestForSearhTree::Run() { ConsoleMenu* cMenu = new ConsoleMenu(); SearhTree<int, Elephant> searhTree(KeyGenElephantAge, compareForInt);//before while! Node<int, Elephant> *x; Elephant *el; int variant; system("cls"); while (true){ variant = cMenu->getMenuForSearhTree(); cout << endl; system("cls"); Elephant elephant; double weight; char* color = new char[40]; char* name = new char[40]; int age; vector<Elephant> v; switch (variant) { case 1:{ AddElementToTree(&searhTree); break; } case 2:{ PreOrderPrintTree(&searhTree); break; } case 3:{ InOrderPrintTree(&searhTree); break; } case 4:{ PostOrderPrintTree(&searhTree); break; } case 5:{ SearchValueByKeyInTree(&searhTree); break; } case 6:{ cout << "Get as sorted array" << endl << endl; v=searhTree.GetAsSortedArray(); if (v.size() == 0) cout << "Tree is empty" << endl << endl; else cout << "Tree as sorted array" << endl << endl; for (int i = 0; i < v.size(); i++) { cout << v[i] << endl; } system("pause"); break; } case 7: { return; } } } //system("pause"); }
void loop() { console.handler(); }