473,383 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

c++ code to convert from infix to post fix

program that uses a stack to convert a given infix expression to a
postfix expression and then to evaluate it.
program should first check if the infix expression entered has
balanced brackets ( (, [, {, ), ], } ) and if not should produce an
error. The program should handle at least the following operators (+,
-, *, /, %). Assume the operands are single digit integers.
thank you

Oct 21 '07 #1
2 6686
On 2007-10-21 15:57, os*************@yahoo.com wrote:
program that uses a stack to convert a given infix expression to a
postfix expression and then to evaluate it.
That is not a correct sentence it is just the end of a sentence, so I
have come up with the following suitable beginning: "Think of a".
program should first check if the infix expression entered has
balanced brackets ( (, [, {, ), ], } ) and if not should produce an
error.
Again, you forgot the beginning of the sentence: "The".
The program should handle at least the following operators (+,
-, *, /, %). Assume the operands are single digit integers.
OK, I am thinking about it.
thank you
No problem, you might also be interested in section 5.2 of the FAQ:
http://www.coders2020.com/cplusplus-...t.html#faq-5.2

--
Erik Wikström
Oct 21 '07 #2
<os*************@yahoo.comwrote:
program that uses a stack to convert a given infix expression to a
postfix expression and then to evaluate it.
program should first check if the infix expression entered has
balanced brackets ( (, [, {, ), ], } ) and if not should produce an
error. The program should handle at least the following operators (+,
-, *, /, %). Assume the operands are single digit integers.

That is a bad assignment and teaches you, by implication, the wrong way to
approach things, it is child like to check for balanced brackets ahead of
time. Be very skeptical of this instructor.
Oct 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve | last post by:
Hi, Could someone post some clean code for a HTTPS POST request running from a server to a 3rd party server in an aspx page. I have some code that works unreliably. If I try the request from a...
2
by: ABC | last post by:
I have a very large amount VB code convert into C Sharp. I just complete it use tools. But it still have some codes errors. There are object to datatype problems. I need to edit many files to...
19
by: caramel | last post by:
i've been working on this program forever! now i'm stuck and going insane because i keep getting a syntax error msg and i just can't see what the compiler is signaling to! #include <stdio.h>...
3
by: italia | last post by:
I have a database with 2 columns and more than million rows. The first column is the id Example of the data (2 columns)- 04731 CRM 04731 CRM 04731 CRM 04731 RVB 04731 RVB
0
by: stesia | last post by:
which is the programm of converting infix to postfix in c++ by using stacks? please help me...
10
by: Gary | last post by:
Hello, Anyone know how to do the following in c# - using inline codeblocks? <% If Request.Form("Name") = "Gary" Then %> <asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary,...
1
by: dean.brunne | last post by:
Hi, In the code below I scroll throught the firldnames of a query ignoring the first three then converting the remaining fields to first: the fieldnames as a record in a field called Product...
1
by: Taras_96 | last post by:
Hi everyone, I've downloaded the PHP code at http://www.inventory-management.org/ and am currently in the process of trying to get the code up and running. I am running PHP version 5.1.6.6, so I...
3
by: jackikay | last post by:
how do i write a program that converts infix to postfix.?
1
by: Avisek Dewan | last post by:
i need a c program to convert infix to postfix using stack of data structures
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.