天天看點

memset的一種用法

将類成員在構造函數中快速置0的方法,可以這樣做

struct  XX

{

BYTE   a;

BYTE   b;

...

XX()

{

memset(this,0,sizeof(XX));

}

};