#include <iostream>
using namespace std;
void main()
{
int *p,i;
p = new int[100];
for (i = 0; i < 100; i++)
*(p + i) = i; //以指针的方式运行
cout << endl;
cout << *(p + i) << ",";
}
delete p;
system("pause");
运行结果: