- 博客(4)
- 资源 (7)
- 收藏
- 关注
原创 返回临时对象时的拷贝构造函数问题
class test{ public : test(void) {cout test(test &t) { cout } ~test(void) { cout } }; test Print(void) { test temp; return temp; } void main(void) { //test a,b(a); test a=Print(); //Print();}
2008-07-25 13:23:00 622
原创 虚函数表问题
//http://blog.csdn.net/haoel/archive/2007/12/18/1948051.aspx#include using namespace std;//测试虚函数表class Base { public: virtual void f() { cout virtual void g1() { cout virtual void h1() { cout };
2008-07-25 12:53:00 273
原创 结构体对齐的具体含义(#pragma pack)
结构体对齐的具体含义(#pragma pack) #pragma pack(4) class TestB { public: int aa; char a; short b; char c; }; int nSize = sizeof(TestB); 这里nSize结果为12,在预料之中。 现在去掉第一个成员变量为如下代码: #pragma pa
2008-07-25 11:53:00 275
转载 getenv用法
#include "stdio.h"#include void main(){ char *fn ; fn=getenv("PATH") ; // fn=getenv("windir") ; printf("%s",fn);}获得环境变量
2008-07-25 11:45:00 434
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人