• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pressanykey函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: chc

int chc(int s,user_info *uin2) {
    board_t board;
    uin = uin2;
    chc_init(s, board);
    mainloop(s, board);
    close(s);
    add_io(0, 0);
    if(chc_my) pressanykey("下次再來繼續對決吧....:p"); 
}
开发者ID:yrchen,项目名称:Athena,代码行数:9,代码来源:chess.c


示例2: chc

void chc(int s) {
    board_t board;
    
    chc_init(s, board);
    mainloop(s, board);
    close(s);
    add_io(0, 0);
    if(chc_my) pressanykey();
}
开发者ID:YanlongLai,项目名称:Program,代码行数:9,代码来源:chc_play.c


示例3: b_notes_edit

int b_notes_edit() {
	char buf[STRLEN], buf2[STRLEN];
	char ans[4];
	int aborted;
	int notetype;
	if (!chkBM(currbp, &currentuser))
		return 0;
	clear();
	move(1, 0);
	prints("�༭/ɾ������¼"); //ѯ�ʱ༭���ֱ���¼
	while (1) {
		getdata(3, 0, "�༭��ɾ������������ (0) �뿪  (1) һ�㱸��¼  (2) ���ܱ���¼? [1] ",
				ans, 2, DOECHO, YEA);
		if (ans[0] == '0')
			return FULLUPDATE;
		if (ans[0] == '\0')
			strcpy(ans, "1");
		if (ans[0] == '1' || ans[0] == '2')
			break;
	}
	makevdir(currboard); //��������¼Ŀ¼
	if (ans[0] == '2') {
		setvfile(buf, currboard, "secnotes");
		notetype = 2;
	} else {
		setvfile(buf, currboard, "notes");
		notetype = 1;
	}
	sprintf(buf2, "(E)�༭ (D)ɾ�� %4s����¼? [E]: ", (notetype == 1) ? "һ��"
			: "����");
	getdata(5, 0, buf2, ans, 2, DOECHO, YEA); //ѯ�ʱ༭����ɾ��
	if (ans[0] == 'D' || ans[0] == 'd') { //ɾ������¼
		move(6, 0);
		sprintf(buf2, "���Ҫɾ��%4s����¼", (notetype == 1) ? "һ��" : "����");
		if (askyn(buf2, NA, NA)) {
			move(7, 0);
			prints("����¼�Ѿ�ɾ��...\n");
			pressanykey();
			unlink(buf);
			aborted = 1;
		} else
			aborted = -1;
	} else
		aborted = vedit(buf, NA, YEA); //�༭����¼
	if (aborted == -1) {
		pressreturn();
	} else {
		if (notetype == 1)
			setvfile(buf, currboard, "noterec");
		else
			setvfile(buf, currboard, "notespasswd");
		unlink(buf);
	}

	return FULLUPDATE;
}
开发者ID:phoenixgao,项目名称:fdubbs,代码行数:56,代码来源:vote.c


示例4: add_new_help

static int add_new_help(int mode, struct helps *pn, char *body, int num)
{
    MYSQL s;
    char newindex[21];
    char newdesc[81];
    char newbody[1001];
    char sql[1200];

    newindex[0]=0;
    newdesc[0]=0;
    newbody[0]=0;

    mysql_init(&s);
    if (! my_connect_mysql(&s)) {
        clear();
        prints("%s\n",mysql_error(&s));
        pressanykey();
        return -1;
    }

    mysql_escape_string(newindex, pn->index, strlen(pn->index));
    mysql_escape_string(newdesc, pn->desc, strlen(pn->desc));
    mysql_escape_string(newbody, body, strlen(body));

    if (num == -1) {
        sprintf(sql,"INSERT INTO help VALUES (NULL, %d, '%s', '%s', '%s');",mode, newindex, newdesc, newbody);
    } else {
        sprintf(sql,"UPDATE help SET prekey='%s', func='%s', content='%s' WHERE id=%d;", newindex, newdesc, newbody, s_help[num].id);
    }

    if (mysql_real_query(&s, sql, strlen(sql))) {
        clear();
        prints("%s\n",mysql_error(&s));
        pressanykey();
        mysql_close(&s);
        return -1;
    }

    mysql_close(&s);

    return 0;
}
开发者ID:xingskycn,项目名称:kbs,代码行数:42,代码来源:newhelp.c


示例5: add_help

int add_help(int mode, int num)
{
    struct helps pn;
    char ans[501];
    extern bool enableESC;

    bzero(&pn, sizeof(pn));

    clear();
    prints("%s帮助,模式: %s\n", num==-1?"增加":"修改",mode==0?"菜单":helpmodestr[mode-1]);

    pn.modeid = mode;

    if (num == -1)
        ans[0] = 0;
    else
        strcpy(ans, s_help[num].index);
    getdata(2,0,"索引(10字节最多):",ans,11,DOECHO,NULL,false);
    if (! ans[0])
        return -1;
    strncpy(pn.index, ans, 10);
    pn.index[10]=0;

    if (num == -1)
        ans[0] = 0;
    else
        strcpy(ans, s_help[num].desc);
    enableESC = true;
    getdata(3,0,"简单描述(40字节最多):",ans,41,DOECHO,NULL,false);
    enableESC = false;
    if (! ans[0])
        return -1;
    strncpy(pn.desc, ans, 40);
    pn.desc[40]=0;

    if (num != -1 && s_help[num].content!=NULL) {
        strncpy(ans, s_help[num].content, 500);
        ans[500]=0;
    } else
        ans[0]=0;

    move(4,0);
    prints("请输入具体描述,15行500字内:");
    multi_getdata(5, 0, 79, NULL, ans, 500, 15, false, 0);

    if (add_new_help(mode, &pn, ans, num) == 0) {
        prints("\n%s成功\n", (num == -1) ? "增加" : "修改");
        pressanykey();
        return 0;
    } else
        return -1;
}
开发者ID:xingskycn,项目名称:kbs,代码行数:52,代码来源:newhelp.c


示例6: help_select

static int help_select(struct _select_def *conf)
{
    clear();
    move(0,0);
    prints("模式: \033[1;33m%s\033[m\n\n", (*((int *)conf->arg) > 0)?helpmodestr[ *((int *)conf->arg) - 1]:"菜单");
    prints("索引: %s\n", s_help[conf->pos-conf->page_pos].index);
    prints("简介: %s\n", s_help[conf->pos-conf->page_pos].desc);
    if (s_help[conf->pos-conf->page_pos].content)
        prints("\x1b[1;31m具体介绍:\x1b[m\n%s", s_help[conf->pos-conf->page_pos].content);
    pressanykey();

    return SHOW_REFRESH;
}
开发者ID:xingskycn,项目名称:kbs,代码行数:13,代码来源:newhelp.c


示例7: check_register_ok

int check_register_ok(void) {
	char fname[STRLEN];

	sethomefile(fname, currentuser.userid, "register");
	if (dashf(fname)) {
		move(21, 0);
		prints("������!! ����˳����ɱ�վ��ʹ����ע������,\n");
		prints("������������ӵ��һ��ʹ���ߵ�Ȩ��������...\n");
		pressanykey();
		return 1;
	}
	return 0;
}
开发者ID:phoenixgao,项目名称:fdubbs,代码行数:13,代码来源:register.c


示例8: affichage_apres_tournoi

int affichage_apres_tournoi (combattant * cbt, int nb_combattants){
		
	temps current_time, refresh_diff_time, refresh_previous_time;
	bool quitter;
	
	/* On remplit la fenetre de la couleur de fond */
	buff_rect(0,0,W_FENETRE,H_FENETRE,CLR_BACKGROUND);
	
	/* On met le logo */
	buff_element (EL_LOGO, (W_FENETRE-400)/2 ,0);
	
	buff_ecrire_texte_xaligncenter ("Voici le classement final des combattants",120,2,CLR_TEXTE_DEFAUT);
	
	buff_classement_combattants (cbt, nb_combattants, 10, 150, W_FENETRE-20, H_FENETRE -200 );
	
	buff_ecrire_texte_xaligncenter ("Appuyez sur n'importe quelle touche pour quitter.",H_FENETRE-20,1,CLR_TEXTE_INFO);
	
	
	
	refresh_previous_time=get_temps();
	
	quitter=FAUX;
	while(!quitter)
	{
		current_time=get_temps();
		
		
		quitter = pressanykey();
	
		if(quitter==QUITTER_AFFICHAGE)
			return QUITTER_AFFICHAGE;
				
		refresh_diff_time=current_time-refresh_previous_time;
		
		if(refresh_diff_time > REFRESH_TIME)
		{
			flip(); 
			refresh_previous_time=current_time;
		}
		else
		if(!quitter)
		{
			delay(REFRESH_TIME - refresh_diff_time); // pause le temps qu'il reste
		}
		
		
	}
	return 0;
}
开发者ID:gre,项目名称:Corewar,代码行数:49,代码来源:graphique.c


示例9: check_register_ok

int check_register_ok(void) {
	char fname[STRLEN];

	sethomefile(fname, currentuser.userid, "register");
	if (dashf(fname)) {
		screen_move(21, 0);
		//% prints("恭贺您!! 您已顺利完成本站的使用者注册手续,\n");
		prints("\xb9\xa7\xba\xd8\xc4\xfa!! \xc4\xfa\xd2\xd1\xcb\xb3\xc0\xfb\xcd\xea\xb3\xc9\xb1\xbe\xd5\xbe\xb5\xc4\xca\xb9\xd3\xc3\xd5\xdf\xd7\xa2\xb2\xe1\xca\xd6\xd0\xf8,\n");
		//% prints("从现在起您将拥有一般使用者的权利与义务...\n");
		prints("\xb4\xd3\xcf\xd6\xd4\xda\xc6\xf0\xc4\xfa\xbd\xab\xd3\xb5\xd3\xd0\xd2\xbb\xb0\xe3\xca\xb9\xd3\xc3\xd5\xdf\xb5\xc4\xc8\xa8\xc0\xfb\xd3\xeb\xd2\xe5\xce\xf1...\n");
		pressanykey();
		return 1;
	}
	return 0;
}
开发者ID:erichuang1994,项目名称:fbbs,代码行数:15,代码来源:register.c


示例10: SearchCrime

static void
SearchCrime()
{
    char uident[IDLEN + 1], buf[256];
    time_t currTime, ActiveTime;
    mcUserInfo *mcuInfo;
    int day, hour, minute;

    nomoney_show_stat("档案室");
    if (!getOkUser("\n请选择查询的档案:", uident, 6, 4)) {
        move(8, 4);
        prints("查无此人");
        pressanykey();
        return;
    }

    sethomefile(buf, uident, "mc.save");
    if (!file_exist(buf))
        initData(1, buf);
    if((mcuInfo = loadData(buf, sizeof (mcUserInfo))) == (void*)-1)
        return;

    ActiveTime = mcuInfo->lastActiveTime;
    currTime = time(NULL);
    if (currTime > ActiveTime) {
        day = (currTime - ActiveTime) / 86400;
        hour = (currTime - ActiveTime) % 86400 / 3600;
        minute = (currTime - ActiveTime) % 3600 / 60 + 1;
        move(9, 1);
        prints("    此人上次犯案是在%d天%d小时%d分钟以前。", day, hour,
               minute);
    }
    unloadData(mcuInfo, sizeof (mcUserInfo));
    pressanykey();
    return;
}
开发者ID:startmenu,项目名称:ythtbbs,代码行数:36,代码来源:police.c


示例11: win_showrec

int win_showrec() {
    int n;
	char buf[256];
    win_loadrec();
    clear();
    prints("[44;37m                      --==    и╗ювеепп╟Я    ==--                             \r\n[m");
    prints("[41m No.          ID        TIME       Steps/sec                            [m\r\n");
    for(n=0; n<=19; n++) {
        sprintf(buf,"[1;37m%3d[32m%13s[0;37m%12d[m     %lf \r\n", n+1, topID[n], topT[n], topS[n]);
		prints(buf);
    }
    prints("[41m                                                                               [m\r\n");
    pressanykey();
    return 0;
}
开发者ID:marvelliu,项目名称:lilacsrc,代码行数:15,代码来源:winmine.c


示例12: set_keydefine_select

static int set_keydefine_select(struct _select_def *conf)
{
    char buf[20],buf2[120],buf3[240];
    clear();
    get_key_name(keymem[conf->pos-1].key,buf);
    get_keys_name(keymem+conf->pos-1,buf2);
    get_modes_name(keymem+conf->pos-1,buf3);
    move(1,0);
    prints("自定义键: %s\n\n", buf);
    prints("替换序列: %s\n\n", buf2);
    prints("允许模式: %s\n\n", buf3);
    pressanykey();

    return SHOW_REFRESH;
}
开发者ID:xingskycn,项目名称:kbs,代码行数:15,代码来源:definekey.c


示例13: print_dhcp_pkt_all

void print_dhcp_pkt_all(void)
{
    pxe_bootp_t *p;
    size_t len;
    int i;
    int ptype[3] = {PXENV_PACKET_TYPE_DHCP_DISCOVER, PXENV_PACKET_TYPE_DHCP_ACK, PXENV_PACKET_TYPE_CACHED_REPLY};

    for (i = 0; i < 3; i++) {
	if (!pxe_get_cached_info(ptype[i],
		(void **)&(p), &(len))) {
	    dprintf("Got packet #%d/%d\n", (i + 1), ptype[i]);
	    print_pxe_bootp_t(p, len);
	    pressanykey();
	}
    }
}
开发者ID:Celelibi,项目名称:syslinux,代码行数:16,代码来源:prdhcp.c


示例14: win_showrec

int win_showrec() {
    char buf[200];
    int n;
    win_loadrec();
    screen_clear();
    //% prints("[44;37m                         --== 扫雷排行榜 ==--                             \r\n[m");
    prints("[44;37m                         --== \xc9\xa8\xc0\xd7\xc5\xc5\xd0\xd0\xb0\xf1 ==--                             \r\n[m");
    prints("[41m No.          ID        TIME                         FROM                      [m\r\n");
    for(n=0; n<=19; n++) {
        sprintf(buf, "[1;37m%3d[32m%13s[0;37m%12d[m%29s\r\n", n+1, topID[n], topT[n], topFROM[n]);
        prints(buf);
    }
    sprintf(buf, "[41m                                                                               [m\r\n");
    prints(buf);
    pressanykey();
}
开发者ID:caidongyun,项目名称:fbbs,代码行数:16,代码来源:winmine.c


示例15: winhelp

int winhelp() {
    clear();
    prints("==╩╤с╜ю╢мФ╪Эели╗ювсно╥== \r\n---------------------------------\r\n\r\n");
    prints("мФ╥╗╨э╪Р╣╔ё╛╨м[1;34mwindows[mоб╣дйС╠Йи╗юв╡Н╡╩╤Ю.\r\n");
        prints("  '[1;32mF[m'╪Э╣двВсцоЮ╣╠сзйС╠Й╣двС╪Э╪╟к╚╩В╣двВсцё╛ ЁлпР╦Ы╬щдЦ╣Ц╩В╣дн╩жц\r\n");
        prints("  вт╤╞еп╤ор╙╫Ьппдджж╡ывВ║ё\r\n");
        prints("  '[1;32mS[m'╪ЭтРоЮ╣╠сзйС╠Йср╪Э╣д╧╕дэ, ©исцю╢╠Йюв.\r\n");
        prints("  '[1;32mH[m'╪Эсцю╢отй╬╠╬╟ОжЗпео╒.\r\n");
        prints("  '[1;32mQ[m'╪ЭмкЁЖсно╥.\r\n");
        prints("  ╣╠фад╩бр╣Тй╠ё╛©исц'[1;32mD[m'©исцю╢к╒пбфад╩║ё\r\n");
        prints("╣зр╩╢н╣Ц╩Вр╩╤╗╩А©╙р╩ф╛ё╛╨эйФ╥Ч╟и║ё\r\n");
        prints("йЛа╥╨Сё╛кы╤х╩╧йг╨э©Л╣дё╛╪╦╨У©ирт╢О╣╫йС╠Йи╗юв╣дкы╤х.\r\n");
        pressanykey();
        winrefresh();
    return 0;
}
开发者ID:marvelliu,项目名称:lilacsrc,代码行数:16,代码来源:winmine.c


示例16: set_smsg_select

static int set_smsg_select(struct _select_def *conf)
{
    clear();
    move(0,0);
    prints("%s信人:%s   时间:%s", s_m[conf->pos-conf->page_pos].type?"收":"发", s_m[conf->pos-conf->page_pos].dest, s_m[conf->pos-conf->page_pos].time);
    prints("\n内容:\n");
    outline(s_m[conf->pos-conf->page_pos].context);
    pressanykey();

    if (! s_m[conf->pos-conf->page_pos].readed) {
        if (sign_smsmsg_read(s_m[conf->pos-conf->page_pos].id , getSession())) {
            s_m[conf->pos-conf->page_pos].readed = 1;
        }
    }

    return SHOW_REFRESH;
}
开发者ID:xingskycn,项目名称:kbs,代码行数:17,代码来源:msg_manager.c


示例17: set_clock_select

static int set_clock_select(struct _select_def *conf)
{
	char clocktypestring[10];
	char clocktimestring[50];

	get_clock_string(clock_data+conf->pos-1,clocktypestring,clocktimestring);

	clear();
	move(1,0);

	prints("%s\n\n",clocktypestring);
	prints("%s\n\n",clocktimestring);
	prints("memo:%s\n",(clock_data+conf->pos-1)->memo);
		
	pressanykey();

	return SHOW_REFRESH;
}
开发者ID:marvelliu,项目名称:lilacsrc,代码行数:18,代码来源:calltime.c


示例18: winmine

int winmine() {
    int x,y;
    win_showrec();
    screen_clear();
    refresh();
    while(1) {
        screen_clear();
        for (x=0;x<=31;x++)
        for (y=0;y<=17;y++) {
             a[x][y]= 0;
             m[x][y]= 0;
             o[x][y]= 0;
        }
        winrefresh();
        winloop();
        pressanykey();
    }
}
开发者ID:caidongyun,项目名称:fbbs,代码行数:18,代码来源:winmine.c


示例19: change_record

change_record(char c)
{
 int a[3];
 char genbuf[250];
 FILE *fs;
 
// sprintf(genbuf, BBSHOME "/home/%s/.dark", currutmp->userid);
 sethomefile(genbuf, currutmp->userid, ".dark");
 if(fs=fopen(genbuf, "r")) {
   fscanf(fs, "%d %d %d", &a[0], &a[1], &a[2]);
   fclose(fs); 
 } else a[0]=a[1]=a[2]=0;
 a[c]++;

 if(fs=fopen(genbuf, "w")) {
   fprintf(fs, "%d %d %d", a[0], a[1], a[2]);
   fclose(fs); 
 } else pressanykey("資料寫入有誤..請通知站長.. :)");
}
开发者ID:yrchen,项目名称:Athena,代码行数:19,代码来源:dark.c


示例20: win_showrec

void
win_showrec()
{
	int n;
	win_loadrec();
	clear();
	printf("\033[2J\033[44;37m                        --== " MY_BBS_NAME
	       " BBS ÍÆÏä×ÓÅÅÐаñ ==--                       \r\n\033[m");
	printf("\033[41m Ãû´Î       Ãû×Ö          ¹Ø    ×ܲ½Êý            "
	       "À´×Ô                    ³é½±  \033[m\r\n");
	for (n = 0; n < NUMREC; n++) {
		printf
		    ("\033[1;37m%3d\033[32m%13s\033[0;37m%12d%10d%20s\033[33m%20s\r\n",
		     n + 1, topID[n], topStage[n], topSteps[n], topFROM[n],
		     prize[n]);
	}
	printf("\033[41m                                                  "
	       "                              \033[m\r\n");
	pressanykey();
}
开发者ID:lytsing,项目名称:ytht,代码行数:20,代码来源:worker.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pressed函数代码示例发布时间:2022-05-30
下一篇:
C++ pressKey函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap