|
-
August 21st, 2008, 04:52 PM
#2
Re: Help a noob out
Welcome to the forum.
Firstly in future can you please use code tags (see the link in my signature) - it makes code much more readable.
Secondly you should post the error you're getting in future : most of the time it's very difficult to spot what's wrong with code just by inspection.
However in this case I'd hazard a guess that you're getting a divide by zero error at these lines :
Code:
int numerator;
int denominator;
int result = numerator / denominator;
You haven't set numerator or denomintor to anything so both will be zero leading to
hence the divide by zero error.
The compiler is probably also warning you that you've used variables without setting them which is true since you haven't set numerator, denominator or solution2 to be anything.
Also you only use a 'return' when a function returns a value : in the case of find2_Click the return type is 'void' meaning it doesn't return anything.
Darwen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|