Thread: Infix to postfix stack class problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    28

    Question Infix to postfix stack class problem

    I am implementing a stack class to convert infix expressions to postfix expressions.
    Program runs when I enter : (A*(B+C))
    for example and gives me the correct ABC+*
    But when I randomly entered (5+3)*3, I got a seg fault.

    I suspect it's something in the actual algorithm.
    Any ideas?
    Here is the relevant code.

    Edit: Code removed

    Any ideas or pointers would be appreciated
    Last edited by stefanyco; 10-05-2011 at 03:17 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Infix to postfix problem..
    By gaurav_13191 in forum C Programming
    Replies: 7
    Last Post: 12-18-2010, 02:04 PM
  2. Replies: 0
    Last Post: 05-12-2010, 01:30 AM
  3. Infix, Postfix, Pseudo-Calculator using Stack ADT
    By sangken in forum C Programming
    Replies: 9
    Last Post: 09-08-2006, 08:17 AM
  4. Replies: 4
    Last Post: 03-12-2006, 02:17 PM
  5. Infix to Postfix Coding Problem
    By megablue in forum C Programming
    Replies: 4
    Last Post: 07-29-2004, 05:47 AM