What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-26 07:11:04
placement new c++
//placement new in c++ char *buf = new char[sizeof(string)]; // pre-allocated buffer string *p = new (buf) string("hi"); // placement new string *q = new string("hi"); // ordinary heap allocation /*Standard C++ also suppor... Add solution
Best helpers
Ranking is empty