int main() { MYSQL conn; MYSQL_RES *res_ptr; MYSQL_ROW sql_row; mysql_init(&conn); if(mysql_real_connect(&conn, "localhost", "jow", "ishu0302", "CDmanagement", 0, NULL, 0)) { show_menu("Oops", char **menu); char ch; ch = getchar(); while (ch != 'q') { switch(ch) { case 'a': add_cd(conn); break; case 'f': find_cd_by_title(conn); break; case 'c': count_cds(conn); break; default: printf("Select error, se;ect again\n"); break; } ch = getchar(); show_menu("Ops", char **menu); } }
int main() { int choice; initscr(); do { choice = getchoice("Options:", current_cd[0] ? extended_menu : main_menu); switch (choice) { case 'q': break; case 'a': add_record(); break; case 'c': count_cds(); break; case 'f': find_cd(); break; case 'l': break; case 'u': break; } } while (choice != 'q'); endwin(); exit(0); }
int main() { int choice; initscr(); do { choice = getchoice("Options:", current_cd[0] ? extended_menu : main_menu); switch(choice) { case 'q': break; case 'a': add_record(); break; case 'c': count_cds(); break; case 'f': find_cd(); break; case 'l': list_tracks(); break; case 'r': remove_cd(); break; case 'u': update_cd(); break; } } while(choice != 'q'); endwin(); exit(EXIT_SUCCESS); }
int main(int argc, const char *argv[]) { int choice; initscr(); do { choice = getchoice("Options:", current_cd[0] ? extended_menu : main_menu); switch (choice) { case 'q': break; case 'a': add_record(); break; case 'c': count_cds(); break; case 'f': find_cd(); break; case 'l': list_tracks(); break; case 'r': remove_cd(); break; case 'u': update_cd(); break; } } while (choice != 'q'); endwin(); return 0; }