Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Placement new #75026
    rseyyedi
    Participant
        Up
        1
        Down
        ::

        Speaking of allocating raw memory, why placement-new uses “new” and not malloc??

        something like this:

        char* memory = malloc(sizeof(Account));
        
        Account* acc = new(memory) Account;

         

      Viewing 1 post (of 1 total)