G
giotheninman
I have a stl list and i have a problem allocating memory for it. I am
using the malloc operator in order to get memory for it and I have
tried using placement new but it still isnt setting up the list
correctly.
The solution im looking for is something as follows
myObj->std::list<tObj> = (std::list<tObj>
*)malloc(sizeof(std::list<tObj>));
SetupListWithoutGettingNewMemory(myObj->std::list<tObj>);
myObj->myList->insert(something);
using the malloc operator in order to get memory for it and I have
tried using placement new but it still isnt setting up the list
correctly.
The solution im looking for is something as follows
myObj->std::list<tObj> = (std::list<tObj>
*)malloc(sizeof(std::list<tObj>));
SetupListWithoutGettingNewMemory(myObj->std::list<tObj>);
myObj->myList->insert(something);