Discussion in 'C++' started by shadowkaizer18, Jan 12, 2011.
can someone help me with the codes for stacks for prefix! badly needed...
you most use 2 stacks for this. one time push them in stack like postfix, then pop all symble.
Are you trying to convert an Infix notation to Prefix notation? Well, if that will be the case then, you must consider the priority of each element that will be involved in the stack simulation. I think you must also consider the precedence of each operator while pushing and/or pop'n elements from the stack. So, if you can actually get my point, well you will be needing 2 stacks...1 for the input and the other for the temporary storage.....
Separate names with a comma.