在C,我做 int (*ptr)[100];
ptr=malloc(sizeof *ptr); // this is the easy/error proof way of doing it
是否有这样做的错误证明C++的方式与new操作 int (*ptr)[100];
ptr=new __what_comes_here?
我想知道是否有人可以帮助我解决一些混乱,我有独特的指针。请看下面的代码: // some class "complex" defined here
int main()
{
while(1)
{
unique_ptr<complex> p(new complex[256]);
p.reset();
}
return 1;
}
function player(name, goals, games) {
this.name = name;
this.goals = goals;
this.games = games;
}
var ricky = new player('Ricky', 7, 15);
var tom = new player('Tom', 15, 17);
var p