Ive been working on this assignment for ages now and its almost working.. well its working but since my output isnt right there must be something wrong lol.

problem... I have to select an object to hit a ball.. the distance the ball travels is done using rand according to whichever object is picked to hit the ball.
When the ball reaches its destination (0) its supposed to display the results : how many hits it takes and its current distance from the end.
It cannot be a negative distance from the hole but it keeps displaying the negative number !!! probably something simple but i've looked at it and looked at it and changed and changed and its still doing it!!!


If anyone has any ideas suggestions would be appreciated.

I wasnt looking for an easy answer to my problem just a direction to look in.
Doesnt matter because whoohoo I figured it out.. was just my cout's in the switch.. DOH!

don't worry, we might be worse than u :P...... come on, we don't know u personally.... n here u r trying to learn...... no one will laugh at u.... e'one is very nice here

This question has already been answered. Start a new discussion instead.