Thread: Expression Trees

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    2

    Expression Trees

    Hello! I am trying to write an expression tree and I am currently having problems with using recursion and adding the nodes correctly. I am not sure how I am supposed to add the subtrees so that the operators and the operands are in the correct place, I'm also not entirely sure on how I'm supposed to stop. The input is in pre-fix(+34 as opposed to 3+4).
    Any help would be good, I'm quite stuck on it!

  2. #2
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463
    post up all of your code, it will make it much easier for us to help you

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    2
    I haven't set out to write any really, in fact, I'm trying to write it right now. I was just wondering of the logic behind it. I'll post up what I have after I write it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. recursion error
    By cchallenged in forum C Programming
    Replies: 2
    Last Post: 12-18-2006, 09:15 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Binary Expression Trees
    By Kanji in forum C++ Programming
    Replies: 0
    Last Post: 03-12-2003, 10:01 PM