Try to use placement new but it kept giving me errors. I remember a while ago, it was working. g++ (ver 4.8.4) on Ubuntu 14.04.
#include typed
To use placement new, you need to have:
new
#include
Also, you could just as easily have used:
int main(int argc, char *argv[]) { char buf[20]; strSession *q = new (buf) strSession; return 0; }