C言語なら俺に聞け( ..
358: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;
}
次ページ最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5166日前に更新/251 KB
担当:undef