{"id":55,"date":"2017-07-29T23:18:08","date_gmt":"2017-07-29T17:18:08","guid":{"rendered":"https:\/\/qtvz.com\/?p=55"},"modified":"2017-09-11T21:30:47","modified_gmt":"2017-09-11T15:30:47","slug":"c%e4%b8%ad%e5%9f%ba%e6%9c%ac%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b%e5%ad%97%e8%8a%82%e6%95%b0%e5%8f%8a%e5%8f%96%e5%80%bc%e8%8c%83%e5%9b%b4","status":"publish","type":"post","link":"https:\/\/qtvz.com\/55.html","title":{"rendered":"C++\u4e2d\u57fa\u672c\u6570\u636e\u7c7b\u578b\u5b57\u8282\u6570\u53ca\u53d6\u503c\u8303\u56f4"},"content":{"rendered":"<p>\u673a\u5668\u5b57\u957f\uff1a\u662f\u6307\u8ba1\u7b97\u673a\u8fdb\u884c\u4e00\u6b21\u6574\u6570\u8fd0\u7b97\u6240\u80fd\u5904\u7406\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u7684\u4f4d\u6570\uff08\u6574\u6570\u8fd0\u7b97\u5373\u5b9a\u70b9\u6574\u6570\u8fd0\u7b97\uff09\u3002\u673a\u5668\u5b57\u957f\u4e5f\u5c31\u662f\u8fd0\u7b97\u5668\u8fdb\u884c\u5b9a\u70b9\u6570\u8fd0\u7b97\u7684\u5b57\u957f\uff0c\u901a\u5e38\u4e5f\u662fCPU\u5185\u90e8\u6570\u636e\u901a\u8def\u7684\u5bbd\u5ea6\u3002\u73b0\u5728\u4e00\u822c\u4e3a32\u4f4d\u53734\u4e2a\u5b57\u8282\uff0c\u4e5f\u670964\u4f4d\u548c16\u4f4d\u7684\u3002<\/p>\n<p>\u7b97\u672f\u7c7b\u578b\u7684\u5b58\u50a8\u7a7a\u95f4\u6309\u7167\u673a\u5668\u800c\u5b9a\u3002\u4e00\u822c\uff0cshort\u7c7b\u578b\u4e3a\u534a\u4e2a\u673a\u5668\u5b57\u957f\uff0cint\u4e3a\u4e00\u4e2a\u673a\u5668\u5b57\u957f\uff0clong\u4e3a1\u62162\u4e2a\u673a\u5668\u5b57\u957f\uff0cfloat\u4e3a\u4e00\u4e2a\u673a\u5668\u5b57\u957f\uff0cdouble\u4e3a\u4e24\u4e2a\u5b57\uff0clong double\u75283\u62164\u4e2a\u5b57\u957f\u3002C++\u6807\u51c6\u89c4\u5b9a\u7684\u662f\u6bcf\u4e2a\u7b97\u672f\u7c7b\u578b\u7684\u6700\u5c0f\u5b58\u50a8\u7a7a\u95f4\uff0c\u4f46\u5176\u5e76\u4e0d\u963b\u6b62\u7f16\u8bd1\u5668\u7528\u66f4\u5927\u7684\u5b58\u50a8\u7a7a\u95f4\u3002\u5982\u679c\u8981\u4fdd\u8bc1\u79fb\u690d\u6027\uff0c\u5c3d\u91cf\u7528__int16 __int32 __int64\u5427\uff0c\u6216\u8005\u81ea\u5df1typedef int INT32\u4e00\u4e0b\u3002<\/p>\n<table class=\"FCK__ShowTableBorders \" style=\"height: 675px;\" border=\"1\" width=\"722\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"xl30\" width=\"113\" height=\"17\"><strong>\u6570\u636e\u7c7b\u578b\u540d\u79f0<\/strong><\/td>\n<td class=\"xl32\" width=\"54\"><strong>\u5b57\u8282\u6570<\/strong><\/td>\n<td class=\"xl31\" width=\"253\"><strong>\u522b\u540d<\/strong><\/td>\n<td class=\"xl33\" width=\"437\"><strong><a href=\"https:\/\/qtvz.com\/tag\/%e5%8f%96%e5%80%bc%e8%8c%83%e5%9b%b4\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e \u53d6\u503c\u8303\u56f4 \u7684\u6587\u7ae0\" target=\"_blank\">\u53d6\u503c\u8303\u56f4<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>int<\/strong><\/td>\n<td class=\"xl25\">*<\/td>\n<td class=\"xl24\">signed,signed int<\/td>\n<td class=\"xl26\">\u7531\u64cd\u4f5c\u7cfb\u7edf\u51b3\u5b9a\uff0c\u5373\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u7684\uff02\u5b57\u957f\uff02\u6709\u5173<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>unsigned int<\/strong><\/td>\n<td class=\"xl25\">*<\/td>\n<td class=\"xl24\">unsigned<\/td>\n<td class=\"xl26\">\u7531\u64cd\u4f5c\u7cfb\u7edf\u51b3\u5b9a\uff0c\u5373\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u7684\uff02\u5b57\u957f\uff02\u6709\u5173<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>__int8<\/strong><\/td>\n<td class=\"xl25\">1<\/td>\n<td class=\"xl24\">char,signed char<\/td>\n<td class=\"xl26\">\u2013128 \u5230 127<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"17\"><strong>__int16<\/strong><\/td>\n<td class=\"xl25\">2<\/td>\n<td class=\"xl24\">short,short int,signed short int<\/td>\n<td class=\"xl26\">\u201332,768 \u5230 32,767<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>__int32<\/strong><\/td>\n<td class=\"xl25\">4<\/td>\n<td class=\"xl24\">signed,signed int<\/td>\n<td class=\"xl26\">\u20132,147,483,648 \u5230 2,147,483,647<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>__int64<\/strong><\/td>\n<td class=\"xl25\">8<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">\u20139,223,372,036,854,775,808 \u5230<\/p>\n<p>9,223,372,036,854,775,807<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>bool<\/strong><\/td>\n<td class=\"xl25\">1<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">false \u6216 true<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>char<\/strong><\/td>\n<td class=\"xl25\">1<\/td>\n<td class=\"xl24\">signed char<\/td>\n<td class=\"xl26\">\u2013128 \u5230 127<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>unsigned char<\/strong><\/td>\n<td class=\"xl25\">1<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">0 \u5230 255<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>short<\/strong><\/td>\n<td class=\"xl25\">2<\/td>\n<td class=\"xl24\">short int,signed short int<\/td>\n<td class=\"xl26\">\u201332,768 \u5230 32,767<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>unsigned short<\/strong><\/td>\n<td class=\"xl25\">2<\/td>\n<td class=\"xl24\">unsigned short int<\/td>\n<td class=\"xl26\">0 \u5230 65,535<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>long<\/strong><\/td>\n<td class=\"xl25\">4<\/td>\n<td class=\"xl24\">long int,signed long int<\/td>\n<td class=\"xl26\">\u20132,147,483,648 \u5230 2,147,483,647<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>long long<\/strong><\/td>\n<td class=\"xl25\">8<\/td>\n<td class=\"xl24\">none (but equivalent to __int64)<\/td>\n<td class=\"xl26\">\u20139,223,372,036,854,775,808 \u5230 9,223,372,036,854,775,807<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>unsigned long<\/strong><\/td>\n<td class=\"xl25\">4<\/td>\n<td class=\"xl24\">unsigned long int<\/td>\n<td class=\"xl26\">0 \u5230 4,294,967,295<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>enum<\/strong><\/td>\n<td class=\"xl25\">*<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">\u7531\u64cd\u4f5c\u7cfb\u7edf\u51b3\u5b9a\uff0c\u5373\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u7684\uff02\u5b57\u957f\uff02\u6709\u5173<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>float<\/strong><\/td>\n<td class=\"xl25\">4<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">3.4E +\/- 38 (7 digits)<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>double<\/strong><\/td>\n<td class=\"xl25\">8<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">1.7E +\/- 308 (15 digits)<\/td>\n<\/tr>\n<tr>\n<td class=\"xl34\" height=\"16\"><strong>long double<\/strong><\/td>\n<td class=\"xl25\">8<\/td>\n<td class=\"xl24\">\u65e0<\/td>\n<td class=\"xl26\">1.7E +\/- 308 (15 digits)<\/td>\n<\/tr>\n<tr>\n<td class=\"xl35\" height=\"17\"><strong>wchar_t<\/strong><\/td>\n<td class=\"xl28\">2<\/td>\n<td class=\"xl27\">__wchar_t<\/td>\n<td class=\"xl29\">0 \u5230 65,535<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\uff08P:\u6307\u9488\u7684\u5927\u5c0f\u4e3a\u5b9a\u503c4\u4e2a\u5b57\u8282\uff09<\/p>\n<p>32\u4f4d\u673a\u5668\u73af\u5883\u4e0b\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td valign=\"top\">\n<p align=\"left\">Type<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">Size<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">\u6570\u503c\u8303\u56f4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u65e0\u503c\u578bvoid<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">\u65e0\u503c\u57df<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u5e03\u5c14\u578bbool\u00a0\u00a0\u00a0\u00a0<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">1 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">true\u00a0\u00a0\u00a0false<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u6709\u7b26\u53f7\u77ed\u6574\u578bshort [int] \/signed short [int]<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">2 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">-32768~32767<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u65e0\u7b26\u53f7\u77ed\u6574\u578bunsigned short [int]\u00a0\u00a0<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">2 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~65535<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u6709\u7b26\u53f7\u6574\u578bint \/signed [int]<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">4 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">-2147483648~2147483647<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u65e0\u7b26\u53f7\u6574\u578bunsigned [int]<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">4 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~4294967295<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u6709\u7b26\u53f7\u957f\u6574\u578blong [int]\/signed long [int]<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">4 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">-2147483648~2147483647<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u65e0\u7b26\u53f7\u957f\u6574\u578bunsigned long [int]<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">4 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~4294967295<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>long long<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">8 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~18446744073709552000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u6709\u7b26\u53f7\u5b57\u7b26\u578bchar\/signed char<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">1 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">-128~127<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u65e0\u7b26\u53f7\u5b57\u7b26\u578bunsigned char<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">1 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~255<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u5bbd\u5b57\u7b26\u578bwchar_t (unsigned short.)<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">2 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">0~65535<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u5355\u7cbe\u5ea6\u6d6e\u70b9\u578bfloat\u00a0<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">4 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">-3.4E-38~3.4E+38<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u578bdouble<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">8 byte<\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">1.7E-308~1.7E+308<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n<p align=\"left\"><strong>long double<\/strong><\/p>\n<\/td>\n<td valign=\"top\">\n<p align=\"left\">8 byte<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p align=\"left\"><strong>\u8bf4\u660e\uff1a<\/strong><\/p>\n<p align=\"left\">\uff081\uff09\u7c7b\u578b\u4fee\u9970\u7b26signed\u548cunsigned\u7528\u4e8e\u4fee\u9970\u5b57\u7b26\u578b\u548c\u6574\u5f62\u3002<\/p>\n<p align=\"left\">\uff082\uff09\u7c7b\u578b\u4fee\u9970\u7b26short\u548clong\u7528\u4e8e\u4fee\u9970\u5b57\u7b26\u578b\u548c\u6574\u5f62\u3002<\/p>\n<p align=\"left\">\uff083\uff09\u5f53\u7528signed\u548cunsigned\u3001short\u548clong\u4fee\u9970int\u6574\u5f62\u65f6\uff0cint\u53ef\u7701\u7565\u3002<\/p>\n<p align=\"left\">\uff084\uff09\u5176\u4e2dbool\u548cwchar_t\u662fC++\u7279\u6709\u7684\u3002<\/p>\n<p align=\"left\">\uff085\uff09\u9664\u4e0a\u8868\u4ee5\u5916\uff0cC\/C++\u90fd\u53ef\u4ee5\u81ea\u5b9a\u4e49\u679a\u4e3eenum\u3001\u8054\u5408union\u548cstruct\u7ed3\u6784\u4f53\u7c7b\u578b\u3002<\/p>\n<p align=\"left\">\uff086\uff09\u4ee5\u4e0asizeof\u901a\u8fc7Windows XP 32\u4f4d\u5e73\u53f0\u6d4b\u8bd5\uff0c\u5176\u4e2d\u67d0\u4e9b\u7c7b\u578b\u6570\u636e\u7684\u5b57\u8282\u6570\u548c\u6570\u503c\u8303\u56f4\u7531\u64cd\u4f5c\u7cfb\u7edf\u548c\u7f16\u8bd1\u5e73\u53f0\u51b3\u5b9a\u3002\u6bd4\u598216\u4f4d\u673a\u4e0a\uff0csizeof(int) = 2\uff0c\u800c32\u4f4d\u673a\u4e0asizeof(int) = 4\uff1b32\u4f4d\u673a\u4e0asizeof(long) = 4\uff0c\u800c64\u4f4d\u673a\u4e0asizeof(long) = 8\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6ce8\u610f64\u4f4d\u673a\u4e0a\u7684pointer\u53608byte\u3002<\/p>\n<p align=\"left\">\uff087\uff09void\u7684\u5b57\u9762\u610f\u601d\u662f\u201c\u65e0\u7c7b\u578b\u201d\uff0c\u4e0d\u80fd\u7528\u6765\u5b9a\u4e49\u53d8\u91cf\u3002void\u771f\u6b63\u53d1\u6325\u7684\u4f5c\u7528\u5728\u4e8e\uff1a&lt;1&gt;\u00a0\u5bf9\u51fd\u6570\u8fd4\u56de\u548c\u51fd\u6570\u53c2\u6570\u7684\u9650\u5b9a\uff0c\u4f8b\u5982\u81ea\u5b9a\u4e49\u65e2\u4e0d\u5e26\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u503c\u7684\u51fd\u6570voidMyFunc(void);&lt;2&gt;\u5b9a\u4e49\u65e0\u7c7b\u578b\u901a\u7528\u6307\u9488void *\uff0c\u6307\u5411\u4efb\u4f55\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<p align=\"left\">\uff088\uff09\u6807\u51c6C++\u5e93\u53caSTL\u8fd8\u63d0\u4f9b\u4e86\u901a\u7528\u6570\u636e\u7ed3\u6784\uff1a\u5b57\u7b26\u4e32\u7c7bstring\uff1b\u5411\u91cf\u7c7b\u6a21\u677fvector\uff1b\u53cc\u7aef\u961f\u5217\u7c7b\u6a21\u677fdeque\uff1b\u94fe\u8868\u7c7b\u6a21\u677flist\uff1b\u5bb9\u5668\u9002\u914d\u5668\u5806\u6808\u7c7bstack\uff08\u5b9e\u73b0\u5148\u8fdb\u540e\u51fa\u7684\u64cd\u4f5c\uff09\uff1b\u5bb9\u5668\u9002\u914d\u5668\u961f\u5217\u7c7bqueue\uff08\u5b9e\u73b0\u5148\u8fdb\u5148\u51fa\u7684\u64cd\u4f5c\uff09\uff1b\u96c6\u5408\u7c7bset\uff1b\u591a\u91cd\u96c6\u5408\u7c7bmultiset\uff1b\u6620\u5c04\u7c7bmap\uff1b\u591a\u91cd\u6620\u5c04\u7c7bmultimap\uff1b\u4f4d\u96c6\u5408bitset\uff1b\u8fed\u4ee3\u5668iterator (\u7c7b\u4f3c\u6307\u9488\u7684\u529f\u80fd,\u5bf9\u5bb9\u5668\u7684\u5185\u5bb9\u8fdb\u884c\u8bbf\u95ee)\u3002<\/p>\n<p align=\"left\">\uff089\uff09\u5728\u6807\u51c6c++\u4e2d\uff0cint\u7684\u5b9a\u4e49\u957f\u5ea6\u8981\u4f9d\u9760\u4f60\u7684\u673a\u5668\u7684\u5b57\u957f\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u4f60\u7684\u673a\u5668\u662f32\u4f4d\u7684\uff0cint\u7684\u957f\u5ea6\u4e3a32\u4f4d\uff0c\u5982\u679c\u4f60\u7684\u673a\u5668\u662f64\u4f4d\u7684\uff0c\u90a3\u4e48int\u7684\u6807\u51c6\u957f\u5ea6\u5c31\u662f64\u4f4d\uff0c\u800cvc\u4e2d__int64\u662f\u4e3a\u572832\u673a\u4f4d\u673a\u5668\u957f\u5b9e\u73b064\u4f4d\u957f\u5ea6\u7684\u6574\u5f62\u6570\u3002<\/p>\n<p align=\"left\">\uff0810\uff09\u5173\u4e8e32\u4f4d\u5e73\u53f0\u4e0b\u7684int\u548clong<\/p>\n<p align=\"left\">long\u4ece\u5b57\u9762\u4e0a\u770b\uff0c\u5e94\u8be5\u662f64\u4f4d\u624d\u66f4\u5408\u7406\uff0c\u628along\u5f53\u621032\u4f4d\u5b9e\u5728\u662f\u4e00\u4e2a\u5386\u53f2\u7684\u5305\u88b1\u3002\u50cfC#\u90a3\u6837\u65b0\u8d77\u7089\u7076\u7684\u7a0b\u5e8f\u8bed\u8a00\uff0c\u7531\u4e8e\u6ca1\u6709\u9700\u8981\u652f\u6301\u8001\u4ee3\u7801\u7684\u95ee\u9898\uff0c\u5c31\u628along\u5f53\u4f5c64\u4f4d\u6765\u5904\u7406\u4e86\u3002<\/p>\n<p align=\"left\">\u572832\u4f4d\u5e73\u53f0\u4e0b\uff0clong\u662f\u76f8\u5bf9short\u800c\u8a00\uff0clong\uff08short\uff09\u7c7b\u578b\u662flong\uff08short\uff09\u00a0int\u7c7b\u578b\u7684\u7b80\u79f0\uff0csizeof(long)= sizeof(int) = 4\u3002int\u548clong\u7684\u8303\u56f4\u867d\u7136\u4e00\u6837,\u4f46\u8f93\u5165\u8f93\u51fa\u683c\u5f0f\u4e0d\u540c,printf int\u7684\u683c\u5f0f\u4e3a%d\uff0c\u800cprintf long\u7684\u683c\u5f0f\u4e3a%ld\u3002<\/p>\n<p align=\"left\">\u8003\u8651\u5230\u7a0b\u5e8f\u7684\u53ef\u79fb\u690d\u6027\uff0c\u8fd8\u662f\u8981\u5c06\u4ed6\u4eec\u533a\u5206\u5f00\u6765\u3002\u4f46\u5f53\u8981\u6c42\u7684\u6570\u503c\u8303\u56f4\u4e3a4byte\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528int\u7c7b\u578b\uff0c\u56e0\u4e3a\u7b2c\u4e00\u7248\u7684C\u8bed\u8a00\u53ea\u6709\u4e00\u79cd\u7c7b\u578b\uff0c\u90a3\u5c31\u662fint\u3002<\/p>\n<p align=\"left\">\uff0811\uff09\u5728Win32API\u53caMFC\u4e2d\u4e3a\u4e86\u4f7f\u7c7b\u578b\u540d\u79f0\u5728\u8bed\u610f\u4e0a\u66f4\u660e\u4e86\uff0c\u5bf9\u4ee5\u4e0a\u57fa\u672c\u7c7b\u578b\u8fdb\u884c\u4e86\u5927\u91cf\u7684typedef\u3002\u4f8b\u5982WINDEF.H\u4e2d\u7684BYTE,WORD,DWORD\u3002<\/p>\n<p align=\"left\">\u539f\u6587\uff1a<a href=\"https:\/\/qtvz.com\/redirect\/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTc3NTk5MjU1My9hcnRpY2xlL2RldGFpbHMvODc5MDI0MQ==\" target=\"_blank\">http:\/\/blog.csdn.net\/a775992553\/article\/details\/8790241<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u673a\u5668\u5b57\u957f\uff1a\u662f\u6307\u8ba1\u7b97\u673a\u8fdb\u884c\u4e00\u6b21\u6574\u6570\u8fd0\u7b97\u6240\u80fd\u5904\u7406\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u7684\u4f4d\u6570\uff08\u6574\u6570\u8fd0\u7b97\u5373\u5b9a\u70b9\u6574\u6570\u8fd0\u7b97\uff09\u3002\u673a\u5668\u5b57\u957f\u4e5f\u5c31\u662f\u8fd0\u7b97\u5668\u8fdb\u884c\u5b9a\u70b9\u6570\u8fd0\u7b97\u7684\u5b57\u957f\uff0c\u901a\u5e38\u4e5f\u662fCPU\u5185\u90e8\u6570\u636e\u901a\u8def\u7684\u5bbd\u5ea6\u3002\u73b0\u5728\u4e00\u822c\u4e3a32\u4f4d\u53734\u4e2a\u5b57\u8282\uff0c\u4e5f\u67096 \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[24],"views":10778,"_links":{"self":[{"href":"https:\/\/qtvz.com\/api\/wp\/v2\/posts\/55"}],"collection":[{"href":"https:\/\/qtvz.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qtvz.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/comments?post=55"}],"version-history":[{"count":4,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/posts\/55\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/qtvz.com\/api\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qtvz.com\/api\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}