moonhkt <> might have writ, in news:185214db-457c-4f20-
8b6b-:
In addition to what Ben pointed out, your problem is here:
> bool field_list[MAX_FIELD_SIZE]; /* list of selected fields */
> printf("# %-30s\n",field_list[1]);
%s wants char *, you're giving it bool (unsigned char).
When you fix this, remember that it is '1' (not 1) that prints as 1.
(Kenny McCormack) might have writ, in
news:ikbge2$k1$:
> Why do this in C at all?
>
> Assuming you're doing it because you want it done and not just as an
> exercise (and a stupid one at that), you should be doing it in AWK or
> Perl (or Python or Ruby or whatever).
Am I the only one who finds this suggestion particularly annoying?
I've never learned Perl (or whatever), and am happy to use C even
when better languages exist. I'm not fully too lazy to learn; the last
several languages I learned included LaTex, Mathematica, Html, Css
and Javascript. I also enjoy learning some linguistics, ancient
history, etc. I wish I weren't so lazy and had learned even more.
I'd have liked to learn juggling, piano playing, and several more of
the Kama Sutra positions.
To pretend that everyone who wants to be an adept C programmer need
also be adept at Perl (or whatever) is almost preciously pretentious.
And why is this a "stupid" exercise? It's an easy exercise, yes, but
for its level of difficulty I don't know why it's particularly "stupid."
---
James Dow Allen