Could anyone explain why this code doesn't crash,
http://www.codeguru.co m/forum/showthread.php? t=315286
while mine does,
The error was "Vector subscript out of range"
if memory needs to be reserved, there is no point to use it?!
Thanks a lot :)
Jack
http://www.codeguru.co m/forum/showthread.php? t=315286
while mine does,
Code:
typedef stdext::hash_map<int, bool> pf_type;
pf_type pf;
cAStar::cAStar()
{
char buff[256];
pf[1] = false;
sprintf (buff, "pf[1] is %s\n", pf[1] ? "TRUE" : "FALSE");
OutputDebugString(buff);
}
The error was "Vector subscript out of range"
if memory needs to be reserved, there is no point to use it?!
Thanks a lot :)
Jack