#include<iostream>
#include<array>
using namespace std;
int main(int argc, char* argv[])
{
int BUFSIZES =3; // å¨æååç
int * foo;
foo = new (nothrow) int[BUFSIZES]; // ç¨new
if (foo == nullptr) {
// åé
é误
}
for (int i = 0; i < BUFSIZES; i++) foo[i] = i + 1;
for (int i = 0; i < BUFSIZES; i++) cout << foo[i] << "\t";
cout << endl;
delete[] foo; // éæ¾å
å
system("pause");
return 0;
}
温馨提示:内容为网友见解,仅供参考