On Tue, Jan 5, 2010 at 6:10 PM, manish bhatia <[email protected]> wrote:
[...]
> Yeah, I see that. But I was expecting to find a way to explicitely call the
> destructor without dropping "std:". The code-example doen't say anything like
> that. :(
#include <iostream>
#include <new>
#include <string>
int main()
{
char* mem = new char[sizeof(std::string)];
void* place = mem;
std::string* s = new(place)std::string("manish");
std::cout << *s << std::endl;
s->std::string::~string();
delete[] mem;
}
--
PJH
http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble