pete said:
He's one of those, who has deduced what C is,
from his experience with his compiler.
"Note that it's "might" screw things up. In fact, even the void main()
thing is an iffy. I've gotten complaints from various
self-proclaimed C Lords, some of which are even USENET C Jerks,
who proclaim the evils of void main() and
that I'm an ass for every propogating such nonsense.
Perhaps I am an ass. But not one of these C poobahs has
yet to provide a specific instance of void main() or the lack of a
return statement actually screwing anything up.
No, they just speak in generalities, which is typical
(most likely because their knowledge of C is weak
and their self-importance overrated)."
I've nver known void main() to screw things up either, but then for
the tiny effort of int main() and a return, why bother stocking with
void main?
As i got used to the int main() advice here (and elsewhere) i went
along with it. It may not seem to make a difference with the popular
computer OSes, but C is used all over the place, why rely on the
platform to sort it out?
When clc regulars like Richard give advice based on the standard it
comes at no personal cost, an often with very little rework of your
existing code needed to get it just that bit more right. I don't see
a reason to complain.
On malloc i did all that uncessary casting stuff too, once.
Thing is, you could buy that book, get by on your own system and then
one day encounter a subtle bug that you just don't understand, and you
don't get it because you'd followed some bad practice and don;t know
better. Pretty frustrating outcome i hope you'll agree.
( i enjoyed C Programming: A Modern Approach, King, as a learning
tool, hoping that's a good example! )