{"rsdb":{"rid":"158068","subhead":"","postdate":"0","aid":"118515","fid":"55","uid":"1","topic":"1","content":"
\n
\r\n#include \n  \n   \r\n\r\n\/\/ \u6b64\u7ed3\u6784\u4f53\u6240\u5360\u5185\u5b58\u7a7a\u95f4\u7684\u5927\u5c0f\u4e3a24\uff0c\r\n\/\/ VC\u4e2d\u7ed9\u7ed3\u6784\u4f53\u5206\u914d\u5185\u5b58\u65f6\uff0c\u4f1a\u5df2\u7ed3\u6784\u4f53\u4e2d\u6240\u5360\u5b57\u8282\u6700\u957f\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\r\n\/\/ \u4f5c\u4e3a\u5206\u914d\u5185\u5b58\u7684\u5355\u5143\uff0c\u5148\u5206\u914d\u4e00\u4e2a\u5355\u5143\uff0c\u5b58\u50a8\u5b57\u7b26c\uff0c\u56e0\u4e3aVC\u4e2d\u57fa\u672c\u6570\u636e\u7c7b\u578b\r\n\/\/ \u7684\u5730\u5740\u504f\u79fb\u5fc5\u987b\u662f\u957f\u5ea6\u7684\u6574\u500d\u6570\uff0c\u6240\u4ee5\u5b58\u50a8\u5b8c\u5b57\u7b26c\u540e\uff0c\u4f1a\u5728\u5206\u914d\u53e6\u5916\r\n\/\/ \u4e00\u4e2a\u5355\u5143\uff0c8\u4e2a\u5b57\u8282\u5b58\u50a8d\uff0c\u7136\u540e\u5728\u5206\u914d8\u4e2a\u5b57\u8282\u5b58\u50a8n\uff1b\r\n\/\/ \u9ed8\u8ba4\u5b57\u8282\u5bf9\u9f50\u65b9\u5f0f\u662f\u672c\u7ed3\u6784\u4f53\u5185\u6240\u5360\u7a7a\u95f4\u6700\u5927\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\u5b57\u8282\u6570\u5bf9\u9f50\u65b9\u5f0f\r\nstruct test\r\n{\r\n    char c;\r\n    double d;\r\n    int n;\r\n};\r\n\r\n\r\n#pragma pack(push)          \/\/ \u4fdd\u5b58\u5b57\u8282\u5bf9\u9f50\u72b6\u6001\r\n#pragma pack(4)             \/\/ \u8bbe\u5b9a\u4e3a4\u5b57\u8282\u5bf9\u9f50\r\n\r\n\/\/ 4\u5b57\u8282\u5bf9\u9f50\u65b9\u5f0f\u4e0b\uff0c\u6b21\u7ed3\u6784\u4f53\u6240\u5360\u5b57\u8282\u6570\u4e3a16\u5b57\u8282\r\nstruct test1\r\n{\r\n    char c1;\r\n    double d1;\r\n    int n1;\r\n};\r\n\r\n#pragma pack(pop)           \/\/ \u6062\u590d\u5bf9\u9f50\u72b6\u6001\r\n\r\nint main()\r\n{\r\n    \/\/ printf("%d\\n", sizeof(double));\r\n    printf("%d\\n", sizeof(test));\r\n    printf("%d\\n", sizeof(test1));\r\n\r\n    getchar();\r\n    return 0;\r\n}\n  <\/stdio.h><\/pre> \n<\/dd>","orderid":"0","title":"VC\u4e2d\u7ed3\u6784\u4f53\u6240\u5360\u7a7a\u95f4\u5927\u5c0f","smalltitle":"","mid":"0","fname":"windows\u7f16\u7a0b\u57fa\u7840","special_id":"0","bak_id":"0","info":"0","hits":"1069","pages":"1","comments":"0","posttime":"2017-07-25 10:23:49","list":"1500949429","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"\u7ed3\u6784<\/A> \u7a7a\u95f4<\/A> \u5927\u5c0f<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"218.17.197.195","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"VC\u4e2d\u7ed3\u6784\u4f53\u6240\u5360\u7a7a\u95f4\u5927\u5c0f","lastview":"1713513451","digg_num":"5303","digg_time":"1710846192","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}