Mac OSXLionでC++を使用しており、次のコードを作成しました。
float* floatArray = new float[10];
for(int i = 0; i < 10; i++)
{
floatArray[i] = 0.0 ;
}
std::cout<< "Test size of a float " << sizeof(floatArray[0]) << std::endl;
// The value is 4 byte which is what I would expect.
std::cout<< "Test the size of the whole array" << sizeof(floatArray) <<std::endl;
// the value is 8. I would have expected the value to be 40 bytes.
何がわからないの?
前もって感謝します