Hello,
I just wanted o followup on this program. After much trial and error, the reason I was getting the seg fault was the example problem had the space allocated in the PostfixString.c file as:
I changed it to:Code:char *s = "x";
% gcc -Wall -o myProgram PostfixString.c StackImplementation.c -lmCode:char s[]="x";
% ./myProgram
Value of postfix expression = 20.000000
I just wanted to thank Salem, kermit and dwks from this post. This was really a great example problem with unexpected twists! :-)
I really want to learn to program and will continue to try more programs. Any advice on how to become a better programmer?