dynpoint.cpp

来自「基本原则 基本原则 基本原则 基本原则基本基本原则」· C++ 代码 · 共 27 行

CPP
27
字号
// Borland C++ - (C) Copyright 1991 by Borland International

// DPOINT.CPP -- exercise in Getting Started

#include <iostream.h>
#include <graphics.h>
#include <conio.h>
#include "figures.h"

int main()
{
// Assign pointer to dynamically allocated object; call constructor
Point *APoint = new Point(50, 100);

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

// Demonstrate the new object
APoint->Show();
cout << "Note pixel at (50,100). Now, hit any key...";
getch();
delete APoint;
closegraph();
return(0);
}

⌨️ 快捷键说明

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