Evaluation of Postfix with C++

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

  1. habtamu

    habtamu New Member

    Joined:
    Jul 18, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Meteorological Officer+Nationa TV presenter
    Location:
    Addis Abeba/Ethiopia
    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

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    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

    Joined:
    Jul 12, 2004
    Messages:
    15,336
    Likes Received:
    377
    Trophy Points:
    83
    Search the forum and you may save 400 GBP. :D
     
  4. aali

    aali New Member

    Joined:
    Jul 16, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    Riyadh
    Why don't you use a Stack or queue?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice