gpt4 book ai didi

C++:malloc 等同于 new 吗?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:52:56 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
What is the difference between new/delete and malloc/free?

我是c++小白,想知道是否

memblock = (char *)malloc( currentByteLength); 

相当于

memblock = new char[currentByteLength]

在 C++ 中?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com