#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

struct node {
 std::string data;
 ~node() { cout<<"object destroyed"<<endl; }
};

int main() {
  node * n = new  node;
  void *p = malloc(sizeof(node));   // not so a good idea ! 
  node *n2 = new (p)node;           // but ok, it's feasible. 

  n->data.assign("string");
  n2->data.assign("string");
  cout << p<<" is " << n2  <<endl; 
  delete n; 
  delete n2; 
  free(p);   
 
  return 0;
}