动态和静态数组的sizeof结果

// test.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <iostream>
using namespace std;

int main(void)
{
	int* a=new int[10];
	int b[10];

	cout<<sizeof(a)<<endl;
	cout<<sizeof(b)<<endl;

	system("pause");
	return 0;
}

你可能感兴趣的:(动态和静态数组的sizeof结果)