摘要:
内存对齐 变量的存储不是简单的堆砌,而是要按照一定的规则对齐。Example:// 内存对齐.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>//#pragma pack(1) //用来设定变量以n字节方式对齐using namespace std;struct st_1{ char a; int b; short c;}; struct st_2{ short c; ... 阅读全文
posted @ 2011-09-08 19:36
Jiang, X.
阅读(210)
评论(0)
推荐(0)


浙公网安备 33010602011771号