Which to use - “operator new” or “operator new[]” - to allocate a block of raw memory in C++?

后端 未结 4 1190
情话喂你
情话喂你 2021-01-12 05:54

My C++ program needs a block of uninitialized memory and a void* pointer to that block so that I can give it to a third party library. I want to pass control of

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 06:38

    for allocating memory to array/list use new[] other than that use new...

提交回复
热议问题