m0_64849779 2021-12-04 11:05 采纳率: 100%
浏览 157
已结题

LNK2019无法解析外部符号help!

img

img

img

  • 写回答

1条回答 默认 最新

  • qzjhjxj 2021-12-04 11:20
    关注

    修改如下,供参考:

    #include <stdio.h>
    #include <stdlib.h>
    #include <conio.h>
    #include <windows.h>
    void HideCursor() //隐藏光标 
    {
        HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
        CONSOLE_CURSOR_INFO cci;
        GetConsoleCursorInfo(hOut, &cci);
        cci.bVisible = FALSE;
        SetConsoleCursorInfo(hOut, &cci);
    }
    void GotoXY(int x, int y)   //光标移动到x,y位置 
    {
        COORD pos = { x,y };
        HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);// 获取标准输出设备句柄
        SetConsoleCursorPosition(hOut, pos); //两个参数分别是指定哪个窗体,具体位置
    }
    int main()
    {
        int x1 = 10, y1 = 1, x2 = x1 + 26 + 2, y2 = y1 + 20; 
        int i;
        char c;
        system("mode con cols=50 lines=25");
        HideCursor();
        HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
        Rectangle((HDC)hOut, x1, y1, x2, y2);//DrawRectangle(x1, y1, x2, y2);
        GotoXY(x1 + 2, y2 - 1);
        printf("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 
        do{
            c = rand() % 26 + 'A';
            for (i = y1 + 1; i < y2 - 1; i = i + 1)
            {
                GotoXY(x1 + c - 'A' + 2, i);
                printf("%c", c);
                Sleep(100);
                GotoXY(x1 + c - 'A' + 2, i);
                printf(" ");
            }
            GotoXY(x1 + c - 'A' + 2, i);
            printf("=");
            Sleep(200);
            GotoXY(x1 + c - 'A' + 2, i);
            printf("%c", c);
        } while (kbhit() == 0);
        return 0;
    }
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月12日
  • 已采纳回答 12月4日
  • 创建了问题 12月4日

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题