So fflush(stdin) is undefined?
Because my c programming book uses it as a way to clear the input buffer. (The book: Sams Teach Yourself C in 21 Days, 4th edition.)
Printable View
So fflush(stdin) is undefined?
Because my c programming book uses it as a way to clear the input buffer. (The book: Sams Teach Yourself C in 21 Days, 4th edition.)
Your book is wrong. FAQ > Explanations of... > Why fflush(stdin) is wrong
Sams Teach Yourself C in 21 Days - Review
And that's the 5th edition!Quote:
In fact, it seems to be the worst book on C I have ever seen.
Got any tables with a short leg?
gg
MSDN fflush I thought it worth noting that while fflush(stdin) in not standard, it's not 'always' wrong.
Regards,
Brian
Sure, while we're at it, you use void main in Java. However, that wasn't the question. The question was is it standard. The answer is: no. End of discussion.
Quzah.
4th, actually. You misread my post. :) But I agree with you.Quote:
And that's the 5th edition!
The review was of the 5th edition.
>> And that's the 5th edition!
My comment was based on the assumption that edition N+1 is typically better than edition N.
But in this case, I can see how the 5th edition may actually be worse than the 4th. :)
gg
Somehow I don't see anything about 'standard' in the OP :rolleyes:Quote:
Originally Posted by quzah
Well you're just an idiot then. The term "defined" in reference to programming, specifically the C language, is "as defined by the standard". Therefore, the term "undefined" means "not defined by the standard". So perhaps you're not an idiot, just ignorant. Now, unless you really are an idiot, you have no excuse. If you are an idiot, you're at least an informed one now.
Quzah.
Does the name calling make you feel bigger and better? I'm sure you'd like me to get all upset and come unglued on the forum. I don't accept your definition of "defined". Better go work on your coding and interpersonal skills instead of your post count flames. BKQuote:
Originally Posted by quzah
I'd say quzah's correct. Trying to define "defined" any other way makes it completely useless. A compiler could be written that gives defined behavior to negative array subscripts, but that in no way makes negative array subscripting a defined operation in general. Whether or not you accept this is a personal issue.Quote:
Originally Posted by Br5an
Sure, if you don't care about writing portable code, and always plan on using the same compiler.Quote:
Originally Posted by Br5an
I'm supposed to care what you think why again? Also, I've yet to see anything wrong with my coding. When someone noteworthy points it out, I'll pay attention. Until then, sod off, as they say.Quote:
Originally Posted by Br5an
Quzah.
Yeah, and I'm going to stop writting WinAPI because it's not 'defined' by ANSI / ISO. :p BK
That is completely different. It is an API not a 'standard library'.Quote:
Originally Posted by Br5an