Created
December 12, 2013 10:34
-
-
Save hwchiu/7926013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
//Write your stack here | |
int main(){ | |
//Create two stack, one for float number, one for operator. | |
//Read the file into some buffer. | |
//Do infix to prefix. | |
for(int i=strlen(buf)-l;i>=0;i--){ | |
// if it is a float number, push to float stack. | |
// if it is a operator, match the operator's priority | |
} | |
//Do infix to postfix. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment