• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Why won't this code work?

mOeeOm

Platinum Member
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
 
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.
 
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.
 
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.
 
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.
 
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).
 
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.
 
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.
 
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 🙂
 
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).
 
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.
 
Back
Top