Jump to content
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


The first thing that I did today was go vote. It was the first election i've voted for, first time i've been eligible to vote for president, though I think i've been eligible for a few local elections. Anyway, that's over with. It was cool if for no other reason than I got to play with a touchscreen for a few minutes [lol]. I love those things.

I've got to code up a homework for school between now and Friday. It's a stack example (using a linked list), so i've got to push and pop and all of that fun stuff to evaluate postfix expressions. The only real problem that I can see is how to get the integers so that they can be evaluated as numbers.

The format for an expression is as follows:

3 45 + .

Now, getting a single character isn't hard, so I push it onto the stack, but when it comes to more than 1 digit number, it pushes each individual digit separately. Then I handle the operator.

Maybe I need to test whether the incoming "character" is a number or an operator and read it as an int or char accordingly?
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!