c++ - When Checking if( ! node->next ), node->next =0x4 should be NULL -


so writing ternary tree , seg faults after maybe 20 insertions. when isolate problem in gdb odd error have never seen before.

on statement of code below, greater node , node should null (or node) when in gdb , check value *tempnode->0x4 causes code attempt set greater (0x4) current node , results in seg fault.

 if( ! tempnode->greater )    else  {  tempnode = tempnode->greater;  } 

here gdb output: (gdb) p *tempnode->greater cannot access memory @ address 0x4

been stuck hours, ideas?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -