Hi people:
Here is my problem:
Codes: (My program is in the exact order as being represented here)
void push1(CStack stk) {
stk.push(1);
}
int main(void) {
CStack mystack;
printf("Stack initially: ");
mystack.print();
push1(mystack);
}
As you may read from above, the push1() function does not work at all.
I overheard from someone that this can be due to the input argument of push1(), e.g. stk(of type CStack) is located in a memory location can not be accessed by push1().
Can anyone give me some more information on this please?
Many thanks
Edit:: Use code tags. This is a warning.- WoLfPaCk