2012-09-29から1日間の記事一覧
C言語 ■構造体配列の初期化サンプル後輩に聞かれたので... - 構造体配列の初期化(全て0埋め版) typedef struct{ short int a; char b[10]; }Sample;Sample st[10]; memset( &st, 0, sizeof(st) );× memset( &st, 0, sizeof(st)*10 );× memset( st, 0, sizeo…
C言語 ■構造体配列の初期化サンプル後輩に聞かれたので... - 構造体配列の初期化(全て0埋め版) typedef struct{ short int a; char b[10]; }Sample;Sample st[10]; memset( &st, 0, sizeof(st) );× memset( &st, 0, sizeof(st)*10 );× memset( st, 0, sizeo…