Home Forums Gamescan Chat42 About
* Login   * Register * FAQ    * Search
It is currently Fri 11-21-2025 11:05PM

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: CS153: Infix to Postfix
PostPosted: Mon 03-07-2005 4:05PM 
Offline
Major General
User avatar

Joined: Wed 08-25-2004 8:55PM
Posts: 2969

Source: TJ South
I can do an Infix to Postfix conversion on paper pretty well now, yet for this assignment, even with the algorithm Cheng attempted to explain in class, I can't figure out how to convert infix to postfix in C++. Can anyone possibly offer any assistance or general tips to help? Thanks


Top
 Profile  
    
 Post subject:
PostPosted: Mon 03-07-2005 6:32PM 
Offline
Brigadier General

Joined: Tue 01-22-2002 12:35PM
Posts: 1057
Location: Shawnee Mission, KS

Source: Off Campus
Use a stack.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Mon 03-07-2005 7:21PM 
Offline
Major General
User avatar

Joined: Wed 08-25-2004 8:55PM
Posts: 2969

Source: TJ South
zkissane wrote:
Use a stack.


I know that much. Its the code to convert it that has me stumped


Top
 Profile  
    
 Post subject:
PostPosted: Mon 03-07-2005 10:43PM 
Offline
Major
User avatar

Joined: Wed 09-03-2003 7:36PM
Posts: 433
Location: Out of sight, out of mind

Source: TJ South
I used a delicious recursive algorithm when I was in CS 153. Mmm...recursion.

_________________
Dethklok is here to make coffee metal.
Try the meat bridge!
Can 15 years of imaginary training be put to use? It can't.


Top
 Profile  
    
 Post subject:
PostPosted: Tue 03-08-2005 10:41PM 
Offline
Sergeant

Joined: Thu 09-09-2004 10:34PM
Posts: 21

Source: McAnerney Hall
No clue. Just like you I am stuck on this assignment.


Top
 Profile  
    
 Post subject:
PostPosted: Tue 03-08-2005 11:29PM 
Offline
Colonel
User avatar

Joined: Sun 08-18-2002 10:33AM
Posts: 751
Location: Kansas City, KS

Source: CompSci Building
Well, if you're still using the same book I used, they give a complete pseudocode outline of the algorithm starting on page 364.

_________________
It is by caffeine alone I set my mind in motion.
It is by the beans of Java the thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Wed 03-09-2005 12:26AM 
Offline
Lieutenant
User avatar

Joined: Sat 07-17-2004 1:57AM
Posts: 74
Location: TJ 218N

Source: TJ North
page 381 in the books we're using now...I think


Top
 Profile  
    
 Post subject:
PostPosted: Wed 03-09-2005 7:54AM 
Offline
Brigadier General

Joined: Tue 01-22-2002 12:35PM
Posts: 1057
Location: Shawnee Mission, KS

Source: Off Campus
What is the algorithm that she presented to the class?

I'd like to help out, but I don't want to just give you guys the answer. I ran into too many people in my day who made it to upper level CS classes and didn't have a damn clue what they were doing.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Thu 03-10-2005 12:47AM 
Offline
Colonel
User avatar

Joined: Wed 08-18-2004 2:30PM
Posts: 518
Location: Sonova Beach

Source: TJ South
Page 381 is correct. It's just as good if not better than anything given in class. It's what I used. Probably the biggest hurdle is just getting it to deal with presedence of the +-*/ operators. And it never hurts to visit the lab with the tudors. I do it about once each assignment. I don't know if it's just me being away from distraction or some of the help I get, but I just work better there. I reccomend it.

_________________
On the other hand, there are five more fingers.


Top
 Profile  
    
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group