C++相談室 part9
■ このスレッドは過去ログ倉庫に格納されています
0245デフォルトの名無しさん
NGNGサイズでなく、配列全体のサイズを返すのですが何故ですか?
その他は納得しています。
int main()
{
double d;
int a[2][3];
cout << sizeof(d) << endl; //8と表示
cout << sizeof(&d) << endl; //4と表示
cout << sizeof(int) << endl; //4と表示
cout << sizeof(a) << endl; //24と表示
cout << sizeof(a[0]) << endl;//12と表示
cout << sizeof(&a) << endl; //24と表示??なんで?
}
■ このスレッドは過去ログ倉庫に格納されています