| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1240 人关注过本帖
标题:tc生成的exe不能在不含tc的windows xp运行?怎么办 ?
取消只看楼主 加入收藏
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
结帖率:80%
收藏
已结贴  问题点数:20 回复次数:5 
tc生成的exe不能在不含tc的windows xp运行?怎么办 ?
情况是:有打出黑框,但不能显示内容,且会自动关闭黑框!
我想它能在其他运行,怎么办啊!
搜索更多相关主题的帖子: windows 
2011-05-13 12:25
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
收藏
得分:0 
回复 2楼 我菜119
应该不是吧!
2011-05-13 19:16
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
收藏
得分:0 
不行啊!
出现画面是:
 C:\Users\ADMINI~1>C:\122.EXE

BGI Error: Graphics not initialized (use 'initgraph')
是什么回事啊?谢谢了!
2011-05-15 20:04
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
收藏
得分:0 
回复 6楼 我菜119
请求解啊!
那个程序在本来的写的电脑上运行是没问题的
2011-05-15 20:07
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
收藏
得分:0 
回复 10楼 我菜119
tc下自己做的字母游戏!不好不笑!
#include <graphics.h>
#include <conio.h>
void welcome()
{
    int c=1;
    cleardevice();
    while(!kbhit())
    {
        if(c%2!=0)
        setcolor(RED);
        else
        setcolor(BLACK);
        outtextxy(280, 400, "please enter to game");
        sleep(1);
        c++;
    }
    getch();
    cleardevice();
}

void over(char * str)
{
    cleardevice();
    setcolor(RED);
    outtextxy(300,250,"score:");
    outtextxy(350,250,str);
    outtextxy(300,300,"game over");
    getch();
}
score(char * str)
{
    str[4]=str[4]+1;
    if(str[4]==('0'+10))
    {
        str[4]='0';
        str[3]=str[3]+1;
    }
    if(str[3]==('0'+10))
    {
        str[3]='0';
        str[1]=str[1]+1;
    }
    if(str[1]==('0'+10))
    {
        str[1]='0';
        str[0]=str[0]+1;
    }
    if(str[0]==('0'+10))
    {
        str[4]='0';
    }
}



void main()
{
    int gdriver=DETECT,gmode;
    int x,y,x1=200,i;
    char * target = "  ";
    char * str="00:00";
    char key;
    initgraph(&gdriver,&gmode,"c:\\tc");
    cleardevice();
    welcome();
    srand(time(0));
    setcolor(8);
    rectangle(1,410,640,460);
    setfillstyle(1,BLUE);
    floodfill(2,411,8);
    setcolor(8);
    rectangle(200,425,400,445);
    setfillstyle(1,RED);
    floodfill(201,426,8);
    setcolor(RED);
    outtextxy(150,420,"life:");
    setcolor(15);
    outtextxy(450,420,"score:");
    rectangle(500,415,550,460);
    setfillstyle(1,YELLOW);
    floodfill(501,416,15);
    setcolor(RED);
    outtextxy(505,435,str);
    while(x1<410)
    {
        setcolor(4);
        rectangle(x1,425,x1+20,445);
        setfillstyle(1,RED);
        floodfill(x1+1,426,RED);
        x1=x1+20;
    }
    while(1)
    {
        target[0] = 65 + rand() % 26;
         x = rand()%630;
        for (y=0; y<400; ++y)
        {
            setcolor(RED);
            outtextxy(x, y, target);
            if(kbhit())
            {
                key = getch();
                if((key == target[0]) || (key == target[0] + 32))
                {
                    setcolor(BLACK);
                    outtextxy(x, y, target);
                    break;
                }
                else if (key == 27)
                {
                    goto EXIT;
                }
            }
            delay(200);
            setcolor(BLACK);
            outtextxy(x, y, target);
        }
        if(y==400)
            {
            setcolor(BLACK);
            rectangle(x1,425,x1-20,445);
            setfillstyle(1,BLACK);
            floodfill(x1-1,426,BLACK);
            x1=x1-20;
            }
            else{
                setcolor(YELLOW);
                outtextxy(505,435,str);
                score(str);
                setcolor(RED);
                outtextxy(505,435,str);
            }
            if(x1==200)
            {
                over(str);
                goto EXIT;
            }
    }

EXIT:
    closegraph();
}
2011-05-16 18:15
daemon1
Rank: 1
等 级:新手上路
帖 子:72
专家分:3
注 册:2011-4-14
收藏
得分:0 
回复 10楼 我菜119
在?
2011-05-18 20:24
快速回复:tc生成的exe不能在不含tc的windows xp运行?怎么办 ?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025770 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved