初见这些类型,真是一脸懵逼,太TM搞不懂是啥东东?但是VC++中经常用到,使用这些类型作为参数和返回值,不得已研究了一番,这才略懂皮毛。
--------------------------------------------------------------------------简单分割线-------------------------------------------------------
查了一下这些类型的定义,如下:
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
typedef FLOAT *PFLOAT;
typedef BOOL near *PBOOL;
typedef BOOL far *LPBOOL;
typedef BYTE near *PBYTE;
typedef BYTE far *LPBYTE;
typedef int near *PINT;
typedef int far *LPINT;
typedef WORD near *PWORD;
typedef WORD far *LPWORD;
typedef long far *LPLONG;
typedef DWORD near *PDWORD;
typedef DWORD far *LPDWORD;
typedef void far *LPVOID;
typedef CONST void far *LPCVOID;
可以发现,其实就是基本类型起别名,其中LP、P开头的大都是指针类型。
来源:CSDN
作者:small_Tang
链接:https://blog.csdn.net/small_Tang/article/details/81125281