标题:大神,帮忙看看,让笑脸移动的程序!
取消只看楼主
haiboself
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:193
专家分:196
注 册:2013-10-23
结帖率:100%
已结贴  问题点数:10 回复次数:1 
大神,帮忙看看,让笑脸移动的程序!
#include<stdio.h>
#include<windows.h>
#include<stdlib.h>
struct move_point
{
    int x;
    int y;
}gotoxy;
int i=20,j=40,end;    char c;
int main(void)
{
    HANDLE hout;
    COORD gotoxy={20,40};
    hout=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(hout,FOREGROUND_RED);
    for(end=0;;end++)
    {
      c=getchar();
      system("cls");
      switch(c)
      {
      case 'w':j=j+i;break;
      case 'a':i=i-1;break;
      case 's':j=j-1;break;
      case 'd':i=i+1;break;
      default: end=0;
      }
      gotoxy.x=i;gotoxy.y=j;
      SetConsoleCursorPosition(hout, gotoxy);
      printf("%c",2);
    }
    getchar();
    return 0;
}
帮忙看一下啊
什么问题呢?
 error C2039: 'x' : is not a member of '_COORD'

c:\program files (x86)\microsoft visual studio\vc98\include\wincon.h(29) : see declaration of '_COORD'
搜索更多相关主题的帖子: include system 
2013-11-16 16:04
haiboself
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:193
专家分:196
注 册:2013-10-23
得分:0 
回复 2楼 rjsp
我明白了
2013-11-16 16:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-423622-1-1.html




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

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