0
Airplane *newBlock = static_cast<Airplane*>(::operator new(BLOCK_SIZE*sizeof(Airplane)));

Airplane *newBlock = static_cast<Airplane*>(malloc(BLOCK_SIZE*sizeof(Airplane)));

Question> What is the difference between the above two methods used to allocate new memory space? Which one is better in which cases?

Thank you

q0987
  • 34,938
  • 69
  • 242
  • 387

0 Answers0