I'm trying to allocate memory to a void pointer and then cast it to a class, which contains a vector member variable. When I try and use the vector member function push_back, my program crashes if I use malloc to allocate memory, but not when I use calloc or new,
Any ideas why malloc causes a problem?
Any ideas why malloc causes a problem?