- int_tmain(intargc, _TCHAR* argv[])
- {
- struct v1 {
- int a;
- short b;
- char c;
- int d;
- double e;
- };
- v1* heap_struct = (v1*)malloc(sizeof(v1));
- heap_struct->a =10;
- heap_struct->b =20;
- heap_struct->c =30;
- heap_struct->d =40;
- heap_struct->e =50;
- return 0;
- }
来源: http://www.bubuko.com/infodetail-1958453.html