1

Possible Duplicate:
C++'s “placement new”

Can we create an instance of class type at the specified location in memory?if yes then how and where we should use such programming techniques?

Community
  • 1
  • 1
Ernie
  • 89
  • 2
  • 5
  • @Greg: I don't think so. That question is asking what it is. This question is asking how to do something (where the answer is, with placement `new`). I'd find this one when searching, not that one. – T.J. Crowder Jun 05 '11 at 07:46

1 Answers1

2

Yes, we can. Use new(area) operator.

Another discussion at SO.

Community
  • 1
  • 1
elder_george
  • 7,849
  • 24
  • 31