C言語なら俺に聞け(入門篇) Part 20at TECH
C言語なら俺に聞け(入門篇) Part 20 - 暇つぶし2ch358:aho
07/10/26 00:29:26
>>350
構造体のポインタを利用してみました。

#include <stdio.h>

typedef struct{
int hoge;
int hage;
int hige;
int huge;
}HOGE;

int main(){
HOGE* hogep = NULL;
try{
hogep = new HOGE();
}catch(...){
printf("new error!\n");
}
/* メンバ変数の初期化 */
hogep->hoge = 1;
hogep->hage = 0;
hogep->hige = 1;
hogep->huge = 1;

printf("%d\n", hogep->hoge);

return 0;
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch