August 6th, 2003, 04:05 PM
Join Date: Jul 2003
Location: Waterloo, ON.
Time spent in forums: < 1 sec
Reputation Power: 0
Messed up string output in C
I am a newbie working with strings in C, and I have ran into this problem where the rear part of the string that is printed (using printf() ) is messed up.
char *finalExp = Pop(&exps);
I am using a stack that stores pointers to strings, and Pop(stack *s) operation pops and returns the top item of the stack.
.....(out3val)) & ((next(out2val)) = (out2à`ÿ¿à`ÿ¿)))
but it should be:
......(out3val)) & ((next(out2val)) = (out2val)))))))
What could be the cause for this problem? Is there any way to fix it?
Thank you in advance.