可能重复: 这是变量还是函数
我错误地使用了类似的东西:
int *arr = new int(100);
它通过编译,但我知道这是错的.它应该是
int *arr = new int[100];
当我写错了编译器时,编译器会怎么想?
c++ new-operator
c++ ×1
new-operator ×1