Lancern's Treasure Chest
00:32 · Mar 4, 2021 · Thu
我的知乎回答:int *p=new int(),得到*p=0,这说明int基本类型也存在构造函数吗? …
https://www.zhihu.com/question/447438455/answer/1760976385?utm_source=org.telegram.messenger&utm_medium=social&utm_oi=799635009047769088
Zhihu
int *p=new int(),得到*p=0,这说明int基本类型也存在构造函数吗? - 知乎
先说答案:没有。因为 new T() 并不等同于调用构造器。本例中使用的是 new 表达式语法(之一):new T in…
Home
Powered by
BroadcastChannel
&
Sepia