⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pixel.cpp

📁 hello everybody. good lucky to you
💻 CPP
字号:
// Borland C++ - (C) Copyright 1991 by Borland International

/* PIXEL.CPP--Example from Getting Started */

// PIXEL.CPP demonstrates the Point and Location classes
// compile with POINT2.CPP and link with GRAPHICS.LIB

#include <graphics.h>   // declarations for graphics library
#include <conio.h>      // for getch() function
#include "point.h"      // declarations for Point and Location classes

int main()
{
   // initialize the graphics system
   int graphdriver = DETECT, graphmode;
   initgraph(&graphdriver, &graphmode, "..\\bgi");

   // move a point across the screen
   Point APoint(100, 50);   // Initial X, Y at 100, 50
   APoint.Show();           // APoint turns itself on
   getch();                 // Wait for keypress
   APoint.MoveTo(300, 150); // APoint moves to 300,150
   getch();                 // Wait for keypress
   APoint.Hide();           // APoint turns itself off
   getch();                 // Wait for keypress
   closegraph();            // Restore original screen
   return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -