Why won't this code work?

mOeeOm

Platinum Member
Dec 27, 2004
2,588
0
0
Everything works...except the second transfer, as you will see in the picture it displays nothing. I click 2 for that option, but nothing comes up, but for everything else it shows what I wrote in the code. It compiles and runs properly...whats up with it?

*The transfer is all the way at the end, the transfertype == 2

http://img297.imageshack.us/my.php?image=why1xa.jpg
 

mOeeOm

Platinum Member
Dec 27, 2004
2,588
0
0
Ya someone else said it works for them too.

Could it be the compiler my university is using? The borland compiler...t.t we're being tested on it tomorrow so I want it to run properly.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Ask your profressor, tell him it works with current compilers and ask him what you're supposed to do about it. As you can see your Borland compiler is ~13 years old so there's no telling what bugs it has in it.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: santaliqueur
Originally posted by: Nithin
pin number. hee hee.

you know. the thing you punch in to the ATM machine

CJ

i think the point was that "PIN" stands for "Personal Identification Number" so PIN Number ends up being redundant.
 

Zorba

Lifer
Oct 22, 1999
15,613
11,254
136
Go to www.bloodshed.net and get their latest C/C++ compiler, I like it a whole lot better than Visual Studio, only real bad thing is I don't think it has a debugger built in (don't know for sure, though).

EDIT: It does have a debugger, never used it myself though so I have no idea how good it is.
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
Originally posted by: Zorba
Go to www.bloodshed.net and get their latest C/C++ compiler, I like it a whole lot better than Visual Studio, only real bad thing is I don't think it has a debugger built in (don't know for sure, though).

EDIT: It does have a debugger, never used it myself though so I have no idea how good it is.


Just let me point out here that the compiler's not at fault here. He has the braces mismatched (probably due to poor formatting).
 

dabuddha

Lifer
Apr 10, 2000
19,579
17
81
It worked for me.
gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)

BTW is that your real pin number? :beer::beer:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just let me point out here that the compiler's not at fault here. He has the braces mismatched (probably due to poor formatting).

Then something must be wrong with my copy/paste, copy of vi or gcc because it compiles and runs fine without any modifications here.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: Nothinman
Just let me point out here that the compiler's not at fault here. He has the braces mismatched (probably due to poor formatting).

Then something must be wrong with my copy/paste, copy of vi or gcc because it compiles and runs fine without any modifications here.

It may compile and run, but the braces are still not right. The "if (transfertype==2)" case is not within the "if (transtype == 3)" block. Therefore, when you enter the transfer type, the only case that is checked is if the transfertype is 1.
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
Originally posted by: oog
Originally posted by: Nothinman
Just let me point out here that the compiler's not at fault here. He has the braces mismatched (probably due to poor formatting).

Then something must be wrong with my copy/paste, copy of vi or gcc because it compiles and runs fine without any modifications here.

It may compile and run, but the braces are still not right. The "if (transfertype==2)" case is not within the "if (transtype == 3)" block. Therefore, when you enter the transfer type, the only case that is checked is if the transfertype is 1.

I'm glad someone bothered to look at the code
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Yea, you're right. I misread the original problem, I didn't realize he was doing transfer(3) then transferout(2), I thought he was just doing withdrawl(2).
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: Nothinman
Yea, you're right. I misread the original problem, I didn't realize he was doing transfer(3) then transferout(2), I thought he was just doing withdrawl(2).

I blame the OP

If you're going to say that something doesn't work, try saying exactly what input is given to the program, rather than just saying that the second transfer doesn't work.

edit: actually, to be fair, the image that is linked in the original post does show the exact input, but i would say that it's still better to put that in the text of the post. i didn't click on the image until just now.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |