您的位置:首页 > 编程语言 > C语言/C++

C++下超强内置类型定义

2016-08-25 22:42 495 查看
typedef char C8;
typedef unsigned char U8;
typedef short S16;
typedef unsigned short U16;
typedef int S32;
typedef unsigned int U32;
typedef long long S64;
typedef unsigned long long U64;

typedef const C8 CC8;
typedef const U8 CU8;
typedef const S16 CS16;
typedef const U16 CU16;
typedef const S32 CS32;
typedef const U32 CU32;
typedef const S64 CS64;
typedef const U64 CU64;

typedef C8* C8P;
typedef U8* U8P;
typedef S16* S16P;
typedef U16* U16P;
typedef S32* S32P;
typedef U32* U32P;
typedef S64* S64P;
typedef U64* U64P;

typedef CC8* CC8P;
typedef CU8* CU8P;
typedef CS16* CS16P;
typedef CU16* CU16P;
typedef CS32* CS32P;
typedef CU32* CU32P;
typedef CS64* CS64P;
typedef CU64* CU64P;

typedef C8& C8R;
typedef U8& U8R;
typedef S16& S16R;
typedef U16& U16R;
typedef S32& S32R;
typedef U32& U32R;
typedef S64& S64R;
typedef U64& U64R;

typedef CC8& CC8R;
typedef CU8& CU8R;
typedef CS16& CS16R;
typedef CU16& CU16R;
typedef CS32& CS32R;
typedef CU32& CU32R;
typedef CS64& CS64R;
typedef CU64& CU64R;

typedef char CHAR;
typedef unsigned char BYTE;
typedef short SHORT;
typedef unsigned WORD;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long DWORD;
typedef long long DLONG;
typedef unsigned long long QWORD;

typedef const CHAR CCHAR;
typedef const BYTE CBYTE;
typedef const SHORT CSHORT;
typedef const WORD CWORD;
typedef const INT CINT;
typedef const UINT CUINT;
typedef const LONG CLONG;
typedef const DWORD CDWORD;
typedef const DLONG CDLONG;
typedef const QWORD CQWORD;

typedef CHAR* CHARP;
typedef BYTE* BYTEP;
typedef SHORT* SHORTP;
typedef WORD* WORDP;
typedef INT* INTP;
typedef UINT* UINTP;
typedef LONG* LONGP;
typedef DWORD* DWORDP;
typedef DLONG* DLONGP;
typedef QWORD* QWORDP;

typedef CCHAR* CCHARP;
typedef CBYTE* CBYTEP;
typedef CSHORT* CSHORTP;
typedef CWORD* CWORDP;
typedef CINT* CINTP;
typedef CUINT* CUINTP;
typedef CLONG* CLONGP;
typedef CDWORD* CDWORDP;
typedef CDLONG* CDLONGP;
typedef CQWORD* CQWORDP;

typedef CHAR& CHARR;
typedef BYTE& BYTER;
typedef SHORT& SHORTR;
typedef WORD& WORDR;
typedef INT& INTR;
typedef UINT& UINTR;
typedef LONG& LONGR;
typedef DWORD& DWORDR;
typedef DLONG& DLONGR;
typedef QWORD& QWORDR;

typedef CCHAR& CCHARR;
typedef CBYTE& CBYTER;
typedef CSHORT& CSHORTR;
typedef CWORD& CWORDR;
typedef CINT& CINTR;
typedef CUINT& CUINTR;
typedef CLONG& CLONGR;
typedef CDWORD& CDWORDR;
typedef CDLONG& CDLONGR;
typedef CQWORD& CQWORDR;

#if _MSC_VER < 1600
#ifndef nullptr
#define nullptr 0
#endif
#endif

int main()
{
CC8P s = "123";
CHAR A = 0;
CHARR B = A;
B = 0xa;
CCHARR C = A;
//C = 0x18;
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  C++ 内置类型 定义