From d484bef85d685174007dd63958cb35e584f19186 Mon Sep 17 00:00:00 2001 From: daleclack <63892434+daleclack@users.noreply.github.com> Date: Tue, 15 Sep 2020 20:52:45 +0800 Subject: [PATCH] Add ege2.cpp --- ege/ege2.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ege/ege2.cpp diff --git a/ege/ege2.cpp b/ege/ege2.cpp new file mode 100644 index 0000000..67a1eb0 --- /dev/null +++ b/ege/ege2.cpp @@ -0,0 +1,16 @@ +#include +#include +int main(){ + initgraph(400,300);//create a wimdow + setfont(16,0,"SimSum");//set font and size + for(;is_run();dely_fps(60)){ + cleardevice();//cls + int x,y; + char str[30]; + mousepos(&x,&y);//get mouse position + sprintf(str,"%4d %4d",x,y);//transform to string + outtextxy(0,0,str); + } + closegraph(); + return 0; +}