当我编码如下时,它将返回'null'并且不会发生异常.
Char* pStr = new(std::nothrow)Char(10);
Run Code Online (Sandbox Code Playgroud)
那么不在new运算符上使用'nothrow'参数呢?它是否也返回'null'?如果是这样,为什么建议使用'nothrow'参数?
Char* pStr = new Char(10);
Run Code Online (Sandbox Code Playgroud)
谢谢你的时间.