Variable declaration - Is this valid in standard C?

A

Al Balmer

/* I never use getc() or getch() or getchar() or whatever it's called,
and therefore I can't remember what it's called--so instead of trying
to remember/use one of these and risk a compilation error, I'll just
cut to the chase and use gets(), which I know will work for this
purpose. */

You *are* joking, aren't you?
 
A

apoelstra

/* I never use getc() or getch() or getchar() or whatever it's called,
and therefore I can't remember what it's called--so instead of trying
to remember/use one of these and risk a compilation error, I'll just
cut to the chase and use gets(), which I know will work for this
purpose. */

Rather than risk a compilation error, forcing you to go back and
a line of code, you'd prefer to risk undefined behavior, which
will potentially force you to rebuild all of humanity? You don't
have the greatest judgement, it seems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top