![]() |
#11
|
|||
|
|||
![]()
I'm guessing a missing "}".
|
#12
|
|||
|
|||
![]()
you know looking at it, it's happening only on M_ASCII and M_BINARY my lines for those are
#define M_ASCII #define M_BINARY i don't have any values for it. now i gotta figure out what the hell values i should give it. OOT > TA's and professors combined. |
#13
|
|||
|
|||
![]()
[ QUOTE ]
you know looking at it, it's happening only on M_ASCII and M_BINARY my lines for those are #define M_ASCII YSSCKY #define M_BINARY SIIHP i don't have any values for it. now i gotta figure out what the hell values i should give it. OOT > TA's and professors combined. [/ QUOTE ] if only i could have known of OOT before I graduated...coding would have been a lot more fun. |
#14
|
|||
|
|||
![]()
Yeah... I could have come up with better names then "blah" "blah1" "asdf" etc. for my random variables...
|
#15
|
|||
|
|||
![]()
i dunno how those should be defined but
if((numbytes<0) && ((charmode!=M_ASCII) || (charmode!=M_BINARY))) is the same as if((numbytes<0)) if M_ASCII != M_BINARY which doesn't seem right |
#16
|
|||
|
|||
![]()
[ QUOTE ]
Yeah... I could have come up with better names then "blah" "blah1" "asdf" etc. for my random variables... [/ QUOTE ] |
#17
|
|||
|
|||
![]()
[ QUOTE ]
i dunno how those should be defined but if((numbytes<0) && ((charmode!=M_ASCII) || (charmode!=M_BINARY))) is the same as if((numbytes<0)) if M_ASCII != M_BINARY which doesn't seem right [/ QUOTE ] haha that was brought up in recitation...my comment before that line: //might need to change "&&" to "||" TA's might have messed up! i wanted to put something else but the proooooooofessor is going to look at it. |
#18
|
|||
|
|||
![]()
well if you change the && to || it just means if(true)
the problem is in here: ((charmode!=M_ASCII) || (charmode!=M_BINARY)) this is always true. A) your name is not fred B) your name is not tom A || B == true for all possible guesses regardless of your name |
#19
|
|||
|
|||
![]()
[ QUOTE ]
if((numbytes<0) && ((charmode!=M_ASCII) || (charmode!=M_BINARY))) [/ QUOTE ] If you've got empty #defines for M_ASCII and M_BINARY, this is gonna come out of the precompiler as: if ((numbytes<0) && ((charmode!=) || (charmode!=))) which is not gud. |
#20
|
|||
|
|||
![]()
[ QUOTE ]
[ QUOTE ] if((numbytes<0) && ((charmode!=M_ASCII) || (charmode!=M_BINARY))) [/ QUOTE ] If you've got empty #defines for M_ASCII and M_BINARY, this is gonna come out of the precompiler as: if ((numbytes<0) && ((charmode!=) || (charmode!=))) which is not gud. [/ QUOTE ] This is the correct answer. You need to define those constants as something if you're going to compare a variable to them. Plus the || should be &&. DeMorgan's theorem and all. Or you could make it ((charmode=M_ASCII) || (charmode=M_BINARY)). Same thing. |
![]() |
|
|