![]() |
| | #1 |
| Registered User Join Date: Nov 2001
Posts: 4
| |
| goof is offline | |
| | #2 |
| the hat of redundancy hat Join Date: Aug 2001 Location: Hannover, Germany
Posts: 2,769
| >please read this source code and tell me what is wrong hm... this is your compilers job. It will do it in a minute if you try. If you don't get what the errormessage means, come back here and post it.
__________________ hth -nv She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate." When in doubt, read the FAQ. Then ask a smart question. |
| nvoigt is offline | |
| | #3 |
| Registered User Join Date: Nov 2001
Posts: 4
| Sorry, I should have been more specific. The program compiles fine, but doesn't work "right" ie how I want it to. I am not asking for any source code, just an explanation of what is wrong. Thanks for your time. |
| goof is offline | |
| | #4 |
| the Corvetter Join Date: Sep 2001
Posts: 1,584
| How does it "not work right"? What are the symptoms?
__________________ 1978 Silver Anniversary Corvette |
| Garfield is offline | |
| | #5 |
| Registered User Join Date: Nov 2001
Posts: 4
| It doesn't add/subtract/multiply/divide the numbers when you enter two numbers and click a operator button. It gives out a seemingly random number, not the right answer. Here is the exec file, It not virused or anything. |
| goof is offline | |
| | #6 |
| Banned Join Date: Aug 2001
Posts: 744
| -> make "numone" and "numtwo" static, otherwise they will lose their value. ->your use of GetDlgItemInt is wrong numone=GetDlgItemInt(hDlg,IDC_NUMONE,NULL,TRUE); ->it is better to check also if you change your operation (+,-,*,/) Code: case IDC_PLUS: case IDC_MINUS: case IDC_MULTIPLY: case IDC_DIVIDE: Calculate(hDlg,numone,numtwo); break; |
| maes is offline | |
| | #7 |
| Registered User Join Date: Nov 2001
Posts: 4
| thanks! Hey thanks maes, it works right now. I really appreciate it! |
| goof is offline | |
| | #8 |
| Guest
Posts: n/a
| thanks! Hey thanks maes, it works right now. I really appreciate it! |
|
![]() |
| Thread Tools | |
| Display Modes | |
|