2008-04-14から1日間の記事一覧

ポインタを学ぶ

C

ポインタは変数に & を付ける。 http://codepad.org/nS9c496d #include<stdio.h> int main(void){ int n; n=1; printf("%d : %p\n", n, &n); return 0; } 1 : 0xbfad0d9c ポインタ変数は型に*を付けて宣言する。 int* n とかでポインタ変数 n を宣言する。 *n でその</stdio.h>…