Thread: Stacks
View Single Post
  #5 (permalink)  
Old March 21st, 2004, 06:44 PM
gbilios gbilios is offline
Authorized User
 
Join Date: Mar 2004
Posts: 33
Thanks: 0
Thanked 1 Time in 1 Post
Default

I changed the code: instead of using count < STACK_SIZE, i used count < tos.

int tos = -1; // top of the stack
int count;

for(count = 0; count <= tos; count++)
{
  printf("%d", stack[count]);
} // end for



George N. Bilios
Reply With Quote