int a; int *b = &a; /* グローバル変数aに100を代入 */ void function1(void) { a = 100; } /* ローカル変数aに100を代入 */ void function2(void) { int a = 100; } /* グローバル変数bの示す先に100を代入 */ void function3(void) { *b = 100; } /* ローカル変数bの示す先に100を代・・・入・・・!? */ void function4(void) { int *b = 100; }「int *b;」の書き方は、「*bはint型」という意味である、という解説がなされる
トラックバックURL: http://www.lunaport.net/mt/mt-tb.cgi/28
コメントする