меню консоль си

menu for console

   int mainmenu(void)
  {
     int ch; 
	 char* mtext = " Please specify the number of the task. \n * You can choose on number from set = {1,2} \n * Specify \"0\" to exit\n" ;
	 char* errmes = " Error(!) = Main menu does not support this command.\n Make sure that your task number is from menu set of commands and try again. " ;
	 
	fflush(stdin);/*here we are cleaning the input = fflush(stdin) isn't cool variant;or use while (getchar() != '\n'); - but this'll stop program*/
    printf("\n%s",mtext );
    ch = getchar() ; /*user choose an item*/
Subscribe to RSS - меню консоль си