cout queues
i want to output a prefix expression to a postfix expression.. most of the stuff are converted using queues and stacks..
here's the code: Code:
#include <ctype.h> this is the only part i'm concerned with.. Code:
void output( Queue postfixQ ) this is my queue.h file.. Code:
#ifndef QUEUE_H this is the queue.cpp file.. Code:
#include <iostream.h> |
I am sorry but what is your question?
Do you get an error or something? |
Check your program to determine a part of it if it has some problems (the program posted is too large!, I don't like to read all of that). Please specify a short (5~35 lines) of your code.
|
i want to output the value of postfixQ in the output () function..
the queue.h and queue.cpp file was only included if you needed to take a peek at how class Queue works.. postfixQ and prefixQ are both classes of Queue.. to put it short, i rearranged prefixQ to look different in postfixQ using queues in the pre_to_post () function.. i am unfamiliar on how to output contents of a queue (FIFO).. suggestions..? |
I'm not sure, but if your postfix wxpression is succesfully made, just output them until underflow returned from output().
What's the problem with output() function? To extract output of a Q you should just DeQueue() while your Q is not empty. |
All times are GMT -5. The time now is 03:09 PM. |