i,m trying to create pointer to pointer List
list<ObjectClass*> *lst_testList;
and trying to use it this way
void FunctioningClass::functioningMethod()
{
ObjectClass *object = new ObjectClass();
object->i_testing = 234;
lst_testList->push_back(object);
object = lst_testList->front();
cout<<object->i_testing;
std::getchar();
}
I can build the program. But when i run it,it gives me this error.
Unhandled exception at 0x012885DA in ConsoleApplication7.exe: 0xC0000005: Access violation reading location 0x00000004.
notice that when i create list like this
list<ObjectClass*> lst_testList;
and use it like this,
lst_testList.push_back(object);
it didn,t give me any error.