I am quite puzzled by the stack overflow which I am encountering.He re
is the pseudocode
//define stack structure
//function operating on stack
void my_stack_functi on( function parameters)
{
do required stuff
if(some conditions obeyed)
call my_stack_functi on(function parameters);
}
//in main()
{
initial conditions;
if(conditions obeyed)
{
call my_stack_functi on(function parameners);
call a_function_to_p op_contents_of_ stack();
}
}
The conditions are so set that my_stack_functi on is not called
infinite number of times. I get a stack overflow when executing this.I
am not sure if I made any logical error.Does anybody see any silly
logic??
Thanks for your help
Ram
is the pseudocode
//define stack structure
//function operating on stack
void my_stack_functi on( function parameters)
{
do required stuff
if(some conditions obeyed)
call my_stack_functi on(function parameters);
}
//in main()
{
initial conditions;
if(conditions obeyed)
{
call my_stack_functi on(function parameners);
call a_function_to_p op_contents_of_ stack();
}
}
The conditions are so set that my_stack_functi on is not called
infinite number of times. I get a stack overflow when executing this.I
am not sure if I made any logical error.Does anybody see any silly
logic??
Thanks for your help
Ram
Comment