当前位置: 首页>>代码示例>>C++>>正文


C++ printMenu函数代码示例

本文整理汇总了C++中printMenu函数的典型用法代码示例。如果您正苦于以下问题:C++ printMenu函数的具体用法?C++ printMenu怎么用?C++ printMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了printMenu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ClearScreen

void BootMenu::Init()
{
  AbstractState::Init();
  
  ClearScreen();
  printMenu();
}
开发者ID:henla464,项目名称:WiRoc-Arduino,代码行数:7,代码来源:BootMenu.cpp

示例2: main

int main()  {
	struct stack p;
	int data,ch, data1, m;
	printf("Enter the maximum size of the stack\n");
	scanf("%d",&m);
	initstack(&p,m);
	do {
	printMenu();	
	printf("Enter your choice\n");
	scanf("%d",&ch);
	switch(ch) {
	  case 1:
		printf("Enter the element to be pushed\n");
		scanf("%d",&data);
		push(&p, data);
		break;
	  case 2:
		data1 = pop(&p);
		if(data1 != -1000)
		printf("The popped element is %d\n",data1);
		break;
	  case 3:
		printf("The contents of the stack are");
		display(p);
		printf("\n");
		break;
	  default:
		return 0;
	}
	} while(1);
	return 0;
}
开发者ID:InteractiveApps,项目名称:Eugenics,代码行数:32,代码来源:Stack.c

示例3: main

/*************************************************************************
Function: main()
**************************************************************************/
int main(void){
	init_wyvern();
	LED_green_on();
	LED_ucgreen_on();
	char input;
	menuScreen = 'a';
	for( ; ; ){
		printMenu();
		input = '0';
		outgoing.command = input;
		if(DataInReceiveBuffer()){
			input = ReceiveByte();
		}
		getJoystick();
		controllerCommand(input);
		controllerTransmit();
		_delay_ms(5);
	if(incoming.battery < 100){
			LED_red_toggle();
			LED_ucred_toggle();
			LED_blue_toggle();
			LED_yellow_toggle();
			LED_green_toggle();
		}
	}
	return 0;
}
开发者ID:Aidsy,项目名称:Remote-Autonomous-Vehicle-Explorer-Network,代码行数:30,代码来源:WyvernController.c

示例4: main

int main(){
 
	while( 0 == 0 ) {
		printMenu();
		printf("Enter command: ");
		
		scanf("%s", choice);

		if (choice[0]=='i'){
			interactive();
		}
		else if (choice[0]=='a'){
			automatic();		
		}
		else if (choice[0]=='e'){
			printf("exiting\n\n");
			break;
		}
		else
			printf("Please enter a valid option\n");
		
		if (status == 1){ //only print the final addresses if everything has gone accordingly
			printAddress();
			status=0; //reset status
		}
	}
	return EXIT_SUCCESS;
}
开发者ID:patxu,项目名称:cs50-Software-Design-and-Implementation,代码行数:28,代码来源:network.c

示例5: pthread_mutex_lock

void Debugger::halt()
{
	pthread_mutex_lock(&printingMutex);
	state = dsHaltPending;
	printMenu();
	pthread_mutex_unlock(&printingMutex);
}
开发者ID:bigfatbrowncat,项目名称:Vintage,代码行数:7,代码来源:Debugger.cpp

示例6: main

int main(int argc, char **argv){
    if (argc < 2) {
        printf("No filename given.\n");
        exit(1);
    }

    char* filename = argv[1];
    int choice;
    int menuSize = 4;
    struct fun_desc menu[] = {
        {"Mem Display", &memDisplay},
        {"File Display", &fileDisplay},
        {"File Modify", &fileModify},
        {"File Copy", &fileCopy}
    };

    printf("File: %s\n", filename);

    while (1) {
        printMenu(menu, menuSize);
        printf("Choice: ");
        choice = getInt();
    
        if (choice > 3 || choice < 0) {
            break;
        }

        (menu[choice].fun)(filename);
    }

    printf("Bye!\n");
    return 0;
}
开发者ID:dvirazulay,项目名称:homework,代码行数:33,代码来源:main.c

示例7: main

int main()
{
	char ch;
	printMenu();

	while(std::cin >> ch) {
		switch(ch) {
			case 'a' :
				std::cout << "Nice choice\n";
				break;
			case 'b' :
				std::cout << "Try another letter\n";
				break;
			case 'c' :
				std::cout << "It's great, but not\n";
				break;
			case 'd' :
				std::cout << "ZzZzZz..\n";
				break;
			default:
				std::cout << "Please enter a, b, c or d: ";
		}
	}

	std::cin.get();
	return 0;
}
开发者ID:red-rick,项目名称:CFundamentals,代码行数:27,代码来源:main.cpp

示例8: handleSubInput

void Menu::parseInput() {
	if (!hasInput()) {
		return;
	}
	String data = Serial.readString();
	if (currentMenuChoice != MENU_NONE) {
		handleSubInput(data);
		return;
	}
	switch (data.toInt()) {
		case 0:
			printMenu();
			break;
		case MENU_SET_NBR_PHOTOS:
			Serial.println("Enter number of photos");
			currentMenuChoice = MENU_SET_NBR_PHOTOS;
			break;
		case MENU_SET_EXPOSURE_TIME:
			Serial.println("Enter wait time per photo [ms]");
			currentMenuChoice = MENU_SET_EXPOSURE_TIME;
			break;
		case MENU_SET_MOTOR_RUN_TIME:
			Serial.println("Enter trolley move time [ms]");
			currentMenuChoice = MENU_SET_MOTOR_RUN_TIME;
			break;
		case MENU_SET_DIRECTION:
			Serial.println("Enter trolley direction [L/R]");
			currentMenuChoice = MENU_SET_DIRECTION;
			break;
		case 5:
			resetTrolley();
			break;
		case 6:
			start();
			break;
		case 7:
			stop();
			break;
		case 9:
			printStatus();
			break;
		default:
			printMenu();
			break;
	}
}
开发者ID:fesse,项目名称:timelaps_arduino,代码行数:46,代码来源:Menu.cpp

示例9: printMenu

void PortaEmbarque::listCategoriasAvioesInfo() {
    vector < vector <string> > info;
    info.push_back(_categorias_avioes_info);
    string title = (string)"Possiveis categorias de aviões";
    vector <string> colnames;
    colnames.push_back("");
    printMenu(title, info, colnames, false, false, false, true);
    cout << endl;
}
开发者ID:carlosmccosta,项目名称:Airport-Management-System,代码行数:9,代码来源:PortaEmbarque.cpp

示例10: menuGetChoice

static int
menuGetChoice (
	       MENU_ITEM	menuTable[],
	       int		numMenuItems,
	       char		*title,
	       unsigned long	options
	       )
{
/*char	inputLine[MAX_INPUT_LINE_SIZE];*/

int	choice;

    /*
     * Suppress display of the menu the first time if we're asked
     */
    if (!(options & MENU_OPT_SUPPRESS_DISP))
		printMenu (menuTable, numMenuItems, title);

    /*
     * Prompt for a selection.  Redisplay the menu and prompt again
     * if there's an error in the selection.
     */
    choice = -1;
	
    while (choice < 0 || choice > numMenuItems)
    {

		diag_printf ("\nEnter the menu item number (0 to quit): ");

		choice = decIn ();

		if (choice < 0 || choice > numMenuItems)

			printMenu (menuTable, numMenuItems, title);

    }

    if (choice == 0)
		
		return (QUIT);

    return (choice - 1);

} /* end menuGetChoice () */
开发者ID:KarenHung,项目名称:ecosgit,代码行数:44,代码来源:test_menu.c

示例11: printArrow

void InboundRadioNodeMenu::Init()
{
  AbstractState::Init();
  if (!initialized) {
    numberOfNodes = Settings::GetInboundRadioNodes(nodes);
    initialized = true;
  }
  printArrow();
  printMenu();
}
开发者ID:henla464,项目名称:WiRoc-Arduino,代码行数:10,代码来源:InboundRadioNodeMenu.cpp

示例12: main

int main(int argc, char** argv) {
    atexit(sudokuExit);
    printWelcomeScreen();
    CLEAR;
    printMenu();
    
//        printSudoku(grid);
//    
    return (EXIT_SUCCESS);
}
开发者ID:harrytodorov,项目名称:dhbw_sudoku,代码行数:10,代码来源:main.c

示例13: menu_loop

void menu_loop(void const *args)
{
    int count = 0;
    while(true)
    {
        setMenu();
        if (++count % 10 == 0)
            printMenu(menuItem);
        Thread::wait(100);
    }
}
开发者ID:cllebrun,项目名称:IBMIoTClientEthernetExample1015,代码行数:11,代码来源:main.cpp

示例14: menu

int menu(){
    int choiche=0;
    printMenu();
    do{
        if(choiche<0 || choiche>10)
            printf("\ninserito numero non ammesso\nPrego reinserire\n");
        scanf("%d", &choiche);
        getchar();
    }while(choiche<0 || choiche>10);
    return choiche;
}
开发者ID:gueTo,项目名称:laboratorioAlgoritmiEStruttureDati,代码行数:11,代码来源:es1main.c

示例15: main

int main()
{
    char opt;
    int i,j;
    printMenu();
    scanf(" %c", &opt);
    while(opt != 'q') {
        switch (opt)
        {
        case 's' : printSquare();
                   break;
        case 't' : printTriangle();
                   break;
        default:   printf("Unknown option\n");
        }
        printMenu();
        scanf(" %c", &opt);
    }
    return 0;
}
开发者ID:nathankent22,项目名称:C-Library,代码行数:20,代码来源:test.c


注:本文中的printMenu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。