Code: Alles auswählen
protected:
struct mp_stack **entryidx[2][2];
Code: Alles auswählen
void Parser::init_stack()
{
struct mp_stack *tmp[2][2];
std::cerr << "init stack" << std::endl;
tmp[0][0] = 0;
tmp[1][0] = 0;
tmp[0][1] = 0;
tmp[1][1] = 0;
entryidx[0][0] = &tmp[0][0];
entryidx[1][0] = &tmp[1][0];
entryidx[0][1] = &tmp[0][1];
entryidx[1][1] = &tmp[1][1];
...
}
Code: Alles auswählen
ParserImpl::ParserImpl() {
sym_table = NULL;
init_stack();
std::cerr << "DEBUG: pre init_table() : Stack adr. : " << *entryidx[0][1] << std::endl;
std::cerr << "DEBUG: pre init_table() : Stack adr. : " << *entryidx[0][1] << std::endl;
std::cerr << "DEBUG: pre init_table() : Stack adr. : " << *entryidx[0][1] << std::endl;
std::cerr << "DEBUG: pre init_table() : Stack adr. : " << *entryidx[0][1] << std::endl;
...
}
Code: Alles auswählen
DEBUG: pre init_table() : Stack adr. : 0
DEBUG: pre init_table() : Stack adr. : 0xbffff880
DEBUG: pre init_table() : Stack adr. : 0xbffff880
DEBUG: pre init_table() : Stack adr. : 0xbffff880
Ich sitze schon lange an diesem Problem.
Gruss,
Lisan.