I have two structs in my code
struct Node
{
int no;
Node* next1;
Node* next2;
char path1;
char path2;
};
struct NodeSet
{
Node* entry;
Node* exit;
};
and a deque like
deque<NodeSet> nsQueue[100]
The problem is when runs to: nsQueue[level+1].push_back(ns)
before execution: +
ns {entry=0x0026f5a0 {no=2 next1=0x0026f350 {no=3 next1=0x002999e8 {no=4 next1=0x00299a38 {...} next2=0xcdcdcdcd {...} ...} ...} ...} ...} NodeSet
after execution: +
ns {entry=0x0026f5a0 {no=2 next1=0x0026f350 {no=-858993460 next1=0x00000000 {no=??? next1=??? next2=??? ...} ...} ...} ...} NodeSet
Why do the values change? Thanks for help.