Question about Download Youtube Videos Download Youtube Free

Open Question

Infix-to-Postfix Conversion using a Dynamic Stack using c++

Posted by on


Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

The calculator we made in visual basic can't function all four operations consecutively

You really have to give a lot more information in order to enable me to help you. However, by wild guessing, I am trying to nudge you into the right direction.

I assume you are trying to program a simple + - * / = infix calculator with or without a graphical user interface.

To get operators and operator precedence right, it is a good idea to create to a data structure of type stack. Stacks are abstract containers with operations push(), pop() and isempty().
  • Push() puts a new object to the stack,
  • Pop() removes one object from the stack and returns it, unless the stack is empty, in which case an error is generated,
  • isempty() is a boolean function that checks if the stack is empty.
A nice-to-have convenience extra is an operation top(). It returns the topmost stack element without removing it (you can emulate by a pop(); push() sequence at some performance costs, so its not a strict requirement for a stack).
Stacks are LIFO memories, Last In, First Out, so what you push most recently will get returned by pop first. Just like a stack of cards where you can put a new card only to the top and take away from the top, too.

Processing of the input is done according to the "Shunting-Yard Algorithm", invented by Edsger Wybe Dijkstra. The link directs you to the Wikipedia page of the algorithm, which does an extensive discussion, much nicer than what I could do here on FixYa.

Jan 08, 2011 | Office Equipment & Supplies


Tips on Editing a PDF File

Since PDF is an open file format architecture specification, anyone can advancecomputer application utilities. Adobe gives the free access to apprehend the agreeable of PDF files. But it is not accessible to adapt a pdf book as we adapt a word document, accordingly to adapt a book one can use the afterward methods:

Commercial software: If you are abiding to use conversion application regularly, you can acquirement thec omputer application which is abnormally fabricated for editing pdf file. Infix and Adobe reader Acrobat are some examples for this type of conversion software.

Freeware PDF editors: Editing a pdf book is additionally accessible with the advice of free application accessible on the net. But you accept limitations like admeasurement of the book and utilities on this free software. Hence accept thecomputer application which fulfills your requirements.

Online editors: There are affluence of multi-lingual conversion application accessible online. This converter application has the adeptness to catechumen thecomputer application from PDF to .doc or .rtf files. To use this ability you accept to upload your book to the website. Then, adapt the book in your browser with the online software. This is not appropriate for arcane abstracts because you accept to upload your book to an alien server.

on Jan 14, 2011 | Computers & Internet

1 Answer

How to convert infix to postfix using stacks in java programming?

u can try the follwing coding
import java.util.*;
//begin coding for the stack interface
interface Stack<E>
public boolean isEmpty();//tests is current stack is empty. Returns true if so, and false if not.
public E top() throws StackException;//retrieves value at the top of the stack. Stack cannot be empty.
public void push(E value) throws StackException;//pushes a value on the top of the stack.
public void pop() throws StackException;//removes a value from the top of the stack. Stack cannot be empty.
}//terminates coding of Stack interface

//begin coding for the objArrayStack class
class objArrayStack<E> implements Stack<E>
public objArrayStack()
}//terminates constructor
public void push(E value)throws StackException
if(topValue<ArraySize-1)//currrent stack is not full
}//terminates if
else //current stack is full
throw new StackException("Error: Overflow");
}//terminates push method
public void pop() throws StackException
if(!isEmpty())//current stack is not empty
else //stack is empty
throw new StackException("Error: Underflow");
}//terminates pop method
public boolean isEmpty()
return topValue==-1;
}//terminates isEmpty method
public E top() throws StackException
if(!isEmpty())//stack is not empty
return (E)Info[topValue];
else //stack is empty
throw new StackException("Error: Underflow");
}//terminates top method
//declare instance variables
final int ArraySize=10;
private Object Info[]=new Object[ArraySize];
private int topValue;

//begins coding for the StackException class
class StackException extends RuntimeException
public StackException(String str)
}//terminates text of constructor
}//terminates text of StackException class

//method to convert from infix to postfix notation
public static String InToPost(String infixString)
//operator stack initialized
objArrayStack<Character> operatorStack = new objArrayStack<Character>();
//postfix string initialized as empty
String postfixString = " ";
//scan infix string and take appropriate action
for(int index = 0; index < infixString.length(); ++index)
char chValue = infixString.charAt(index);
if(chValue == '(')
else if(chValue == ')')
Character oper =;
while(!(oper.equals('(')) && !(operatorStack.isEmpty()))
postfixString += oper.charValue();
oper =;
}//end while loop
}//end else if
else if(chValue == '+' || chValue == '-')
if(operatorStack.isEmpty()) //operatorStack is empty
else //current operatorStack is not empty
Character oper =;
while(!(operatorStack.isEmpty() || oper.equals(new Character('(')) || oper.equals(new Character(')'))))
postfixString += oper.charValue();
}//ends while loop
}//end else
}//end else if
else if(chValue == '*' || chValue == '/')
Character oper =;
while(!oper.equals(new Character('+')) && !oper.equals(new Character('-')) && !operatorStack.isEmpty())
postfixString += oper.charValue();
}//end while loop
}//end else
}//end else if
postfixString += chValue;
}//end for loop
Character oper =;
if(!oper.equals(new Character('(')))
postfixString += oper.charValue();
}//end if
}//end while
return postfixString ;
}//terminates text of InToPost method

public static void main(String[]args)
objArrayStack mystack = new objArrayStack();
System.out.println("Enter a string");
Scanner scan = new Scanner(;
String str = scan.nextLine();
}//terminates text of main method
}//terminates text of objArrayStack class

Mar 16, 2010 | Sun Java Programming Language (cdj-275)

1 Answer

What problems come in project of library management

stack mismatch, over flow, memory dispatch, dynamic array alloaction, pointer conversion, type mismatch are some of the problem u experience in all projects

Oct 27, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

6 Answers

How do I edit text on a pdf file?

With Acrobat 6 Professional -Select Tools > Advanced Editing > TouchUp Text Tool
Next, click on the text line where you want to do an edit.
Click-drag to select a string of characters and let your fingers walk the keyboard.
Or, just start where you've placed the cursor.
You'll find it somewhat awkward. PDF is not a word editing/processing
format. If desired edits are few and simple the TouchUp Text Tool
will suffice. If the desired edits are more than you really want to return
to the authoring application (word processor, whatever) to make the edits.
Then produce a new output PDF.

Note that the above presumes the PDF does not have security applied that prevents such edits.

Mar 01, 2009 | Adobe Acrobat 6.0 Professional for PC

5 Answers

Source code for stack using arrays in c++

stack in c using arrays
/* Program of stack using array*/

Dec 05, 2008 | Computers & Internet

1 Answer

My E-Mail Server is down

the solution i will be posting assumes you already have postfix installed in the new machine and that your new postfix server is able to relay mails. Old configurations has been copied/transported to the new server ( and the only remaining task is to move all the mails to the new postfix server.

copy /home (your maildir) to your new server - check your postfix configuration to verify your maildir

also make sure you have copied


to your new mail server ( these are your mail related files)

Note: This is assuming you have identical setup you have with your old email server. double check your postfix configuaration before proceeding.

Good Luck

Oct 22, 2008 | Dell Dimension 3000 PC Desktop

1 Answer

I'm almost done but there are few problems

It has been almost 17 months, and nobody has helped you.
By now, you probably have failed the computer-course,
and no longer need any help.

Aug 12, 2008 | Computers & Internet

1 Answer

Linex mail server

Try Postfix. it uses most of the same commands as sendmail and isn't as complicated as sendmail.

Mar 13, 2008 | Computers & Internet

1 Answer

Tree structure

Mor especifics are needed in order to help you.

Jan 29, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

50 people viewed this question

Ask a Question

Usually answered in minutes!

Top Download Youtube Videos Computers & Internet Experts


Level 3 Expert

5699 Answers

William Alequin

Level 3 Expert

931 Answers

Pete Vanderwaal

Level 2 Expert

56 Answers

Are you a Download Youtube Videos Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides