1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Evaluation of Postfix with C++

Discussion in 'C++' started by habtamu, Jul 18, 2008.

  1. habtamu

    habtamu New Member

    Dear Sir/Madam
    Please Help me with this Problem. the Problem is Write a C++ Program to evaluate Postfix notation,here is the prototype.
    Code:
    struct charNode
    {
    char data;
    charNode *next;
    };
    struct intNode
    {
    int data;
    intNode *next;
    };
    void readInput(charNode*&);
    void reverseInput(charNode*&,intNode*&);
    void evaluate(charNode*,intNode*&);
    void displayResult(intNode*);
    int isoperator(char);
    void createchar(charNode*&);
    void createInt(intNode*&);
    void pushchar(charNode*&);
    void pushInt(intNode*&,int);
    char popchar(charNode*&);
    int popInt(intNode*&);
    int isEmpty(charNode*);
    int isEmpty(intNode*);
    void main()
    {
    charNode *charTopOriginal,*charTopReversed;
    intNode *intTop;
    create char(charTopOriginal);
    create char(charTopReversed);
    create Int(intTop);
    readeInput(charTopOriginal);
    reversedInput(charTopOriginal,charTopReversed);
    evaluate(charTopOriginal,charTopReversed);
    displayResult(intTop);
    getch();
    }
     
    Last edited by a moderator: Jul 18, 2008
  2. xpi0t0s

    xpi0t0s Mentor

    Sure, no problem. My rates are GBP100/hour, minimum 4 hours. For no extra charge I'll submit the work directly to tour teacher if you give me their email address. I'll need a few more details (example input and output) if you decide to go ahead.
     
  3. shabbir

    shabbir Administrator Staff Member

    Search the forum and you may save 400 GBP. :D
     
  4. aali

    aali New Member

    Why don't you use a Stack or queue?
     

Share This Page