C++ placement new

前端 未结 5 793
我在风中等你
我在风中等你 2020-12-01 20:01

Sorry if this question will sound stupid, but I\'m just starting to learn C++ and there is something confusing me about the placement new

I\'ve been reading C++ Prim

5条回答
  •  醉梦人生
    2020-12-01 20:14

    Memory is memory. The machine doesn't care what type of data is stored there, that's up to the language to define and enforce. The answer to "why" is "because C++ is designed to let you."

提交回复
热议问题