我想用point类 应该包含什么头文件 c++

我想用point类 应该包含什么头文件 c++,第1张

Header: Declared in Windef.hinclude Windows.h.

#include "Windef.h" 或者 #include "Windows.h"

POINT

The POINT structure defines the x- and y- coordinates of a point.

typedef struct tagPOINT {

LONG x

LONG y

} POINT, *PPOINT

Members

x

Specifies the x-coordinate of the point.

y

Specifies the y-coordinate of the point.

Requirements

Windows NT/2000/XP: Included in Windows NT 3.1 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Windef.hinclude Windows.h.

See Also

这貌似是所谓的宏定义。“_POINT_H

”并无什么实际的意义。只是为了防止重复调用文件。如在一个文件中已经#include

,在另一文件中也#include

,程序为了防止多次调用iostream.h这个头文件,估计在其前面就加入了类似#ifndef

***

#define

***,***可以是任意的字符串。只是为了便于阅读等,一般***采用大写,字符串无点,只有下划线。例如此文件就是point.h。(个人理解)


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/11794218.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-18
下一篇 2023-05-18

发表评论

登录后才能评论

评论列表(0条)

保存