Sign in to follow this  

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

This topic is 1050 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

How can I fix these errors. I tried to remove the errors with // but from that came out more different errors

Share this post


Link to post
Share on other sites

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