Jump to content
  • Advertisement
Sign in to follow this  
Angel Ivanov

Source code with errors: http://ideone.com/eSWKwf

This topic is 1299 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


A few more things which don't cause errors but caught my eye:

position could be set to -1 once before the loop instead of every time within the loop

- "<= SIZE - 1" is the same as "< SIZE"

- I personally don't like to open namespaces, instead of "using namespace std" go with std::cout, etc., this is not a problem right now, but will be later on

Share this post

Link to post
Share on other sites

Eh people, that looks like homework.


I was about to say the same thing.


Also, you should avoid this:

using namespace std;

and instead, just pull in the symbols you want or reference them directly, e.g. std::cout. Using entire namespaces can introduce variable name clashes.


Edit: Ninja'd by Epi... ph34r.png

Edited by braindigitalis

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!