Which header file I need to include to use gotoxy() function?

前端 未结 7 2082
夕颜
夕颜 2021-01-07 04:06

This is the student-report-card-project, I got some problems when I shifted this code to the dev C++ from borland C. Now when I try to complile the program in dev C++, it gi

7条回答
  •  悲&欢浪女
    2021-01-07 04:24

    add this header and function in your code:

    #include "windows.h"
    
    void gotoxy(int x, int y) 
    { 
        COORD coord;
        coord.X = x; 
        coord.Y = y;
        SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
    }
    

提交回复
热议问题