Hi All,
I am somewhat confused here and would need some assistance on how to fix this issue. The code runs for some time and crashes at some point. This problem occurs when I have a larger workload on the code. It works well for small loads.
The error returned is:
First chance exception 0xC0000005 ACCESS_VIOLATION occurred at 0x00427D77, write of address 0x00000008 at 0x00427D77
on line
return conjCodis;
I have read some stuffs on the access violation thing, pointing to the pointers. I am unable to fix mine. Thanks for your help.
vector<double> Place::addMark(Arbre *mark, double cod)
{
vector<double> conjCodis;
Arbre tokAux = *mark;
map<Arbre,vector<double> ,ltstr>::iterator pos = marcatges.find(tokAux);
if(pos!=marcatges.end())
{
mark = const_cast<Arbre*> (&((*pos).first));
conjCodis = marcatges[*mark];
marcatges[*mark].push_back(cod);
}
else
{
marcatges[*mark].push_back(cod);
}
return conjCodis;
}