By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,160 Members | 1,983 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,160 IT Pros & Developers. It's quick & easy.

What is C preprocessor?

P: n/a
I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it?
Mar 6 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
"Zhou Yan" writes:
>I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it
This should be helpful. Wikipedia is often helpful on computer related
problems.

http://en.wikipedia.org/wiki/C_preprocessor
Mar 6 '07 #2

P: n/a
Zhou Yan <zh*****@stu.ust.hkwrites:
I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it?
Wikipedia has some information, although it's not the greatest treatment:
http://en.wikipedia.org/wiki/C_preprocessor
--
"The lusers I know are so clueless, that if they were dipped in clue
musk and dropped in the middle of pack of horny clues, on clue prom
night during clue happy hour, they still couldn't get a clue."
--Michael Girdwood, in the monastery
Mar 6 '07 #3

P: n/a

"Zhou Yan" <zh*****@stu.ust.hkwrote in message
news:m2************@stu.ust.hk...
I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it?
Its not always implemented as a seprate program. In many compilers its now
part of the main compiler. So if you use GCC then the "-E" flag only run the
pre-processor.
Mar 6 '07 #4

P: n/a
"osmium" <r1********@comcast.netwrote:
"Zhou Yan" writes:
I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it

This should be helpful. Wikipedia is often helpful on computer related
problems.
Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.
http://en.wikipedia.org/wiki/C_preprocessor
In this case, for example, that article is liable to leave the innocent
passer-by with a broken understanding of the C preprocessor. For
example, the second sentence in that article (as it was when I read it;
another problem with Wikipedia is that it is nearly impossible to
discuss any one article, since it may change behind the back of the
debaters) is already wrong on two counts.

Richard
Mar 7 '07 #5

P: n/a
Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.
Surely that's a bit hyperbolic - the articles on a range of topics are
certainly adequate for most casual users.
In this case, for example, that article is liable to leave the innocent
passer-by with a broken understanding of the C preprocessor.
The range of topics I cited above does not really include any highly
technical and rigorously specified topics, including C, and yes, it's
generally not a good idea to rely on it for accurate technical
details.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Mar 7 '07 #6

P: n/a
"Richard Bos" writes:
"osmium" <r1********@comcast.netwrote:
>This should be helpful. Wikipedia is often helpful on computer related
problems.

Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.
>http://en.wikipedia.org/wiki/C_preprocessor

In this case, for example, that article is liable to leave the innocent
passer-by with a broken understanding of the C preprocessor. For
example, the second sentence in that article (as it was when I read it;
another problem with Wikipedia is that it is nearly impossible to
discuss any one article, since it may change behind the back of the
debaters) is already wrong on two counts.
That's nothing! I once got a book out of the library and *it* was wrong. I
don't remember what book it was or what it said but it was definitely wrong
and so I have made it a point of avoiding the library ever since. Now, I
get most of my information from guys I strike up conversations with in
Starbucks.
Mar 7 '07 #7

P: n/a
Richard Bos wrote:
"osmium" <r1********@comcast.netwrote:
>"Zhou Yan" writes:
>>I am a novice, I want to know what is CPP, as showed in title. I
heared about it but the book I read do not mentioned it. Maybe
this book is too "introductory". Any one can give me a concept about it
This should be helpful. Wikipedia is often helpful on computer related
problems.

Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.
[OT, Naturally]

Like any encyclopedia, it is going to be incomplete, generalized and
open to argument. Wikipedia has roughly the same rate of error as other
printed encyclopedia; the types of errors are slightly different.

This is, in fact, all we really ask of encyclopedia.

For a gentle introduction to the C Preprocessor I wouldn't worry about
it. I bet my copy of K&R is wrong on some counts, too.
Mar 7 '07 #8

P: n/a

Christopher Benson-Manica wrote:
Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.

Surely that's a bit hyperbolic - the articles on a range of topics are
certainly adequate for most casual users.
I think the more important issue is not the presence of errors, (as
any diverse collection of data is bound to have some errors), but the
scope for unrestrained editing and it's attendant vandalism. To be
fair, they've tried to alleviate it to some extent by allowing only
registered edits, but it's still open to abuse far more than a hard-
copy or non-wiki encyclopaedia, as the recent case of false identity,
(some university student posing successfully as a professor for
several years), demonstrates.

However it's popularity seems to be overshadowing it's problems.

Mar 7 '07 #9

P: n/a
On Wed, 7 Mar 2007 16:15:15 +0000 (UTC), in comp.lang.c , Christopher
Benson-Manica <at***@ukato.freeshell.orgwrote:
>Richard Bos <rl*@hoekstra-uitgeverij.nlwrote:
>Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.

Surely that's a bit hyperbolic - the articles on a range of topics are
certainly adequate for most casual users.
weeellll... it depends on your standards for correctness and how much
you care if you are mildly misinformed. The most accurate articles are
ones written by those with a form of obsessive-compulsive disorder
(say, about Klingon or Wombles). Anything to do with politics,
religion, science, history, etc etc tends to be subjective and many
articles are prone to conspiracy-theory-itis and muddleheadedness.

I tend to find the technical articles /fairly/ reliable, but one
invariably needs to x-ref to an independent source. I've come across
some hideously inaccurate stuff.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Mar 7 '07 #10

P: n/a
On Wed, 07 Mar 2007 13:59:35 -0500, in comp.lang.c , Clever Monkey
<cl**************@hotmail.com.invalidwrote:
>Like any encyclopedia, it is going to be incomplete, generalized and
open to argument. Wikipedia has roughly the same rate of error as other
printed encyclopedia; the types of errors are slightly different.
You're thinking of the so-called analysis carried out last year by
Nature. This was an extremely restrictive study and is considered at
best to be true only of the objectively measurable articles eg
science, technology or history. Anything subjective - eg biography,
politics, religion - is IMHO highly unreliable.
>This is, in fact, all we really ask of encyclopedia.
I ask somewhat more, frankly. I expect articles to be factual,
researched, verifiable and devoid of hearsay, rumour, opinion and
redisseminated misinformation.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Mar 7 '07 #11

P: n/a
"osmium" <r1********@comcast.netwrote:
"Richard Bos" writes:
"osmium" <r1********@comcast.netwrote:
This should be helpful. Wikipedia is often helpful on computer related
problems.
Not IMO. Wikipedia shovels data, but often does not provide knowledge.
The whole project is fundamentally flawed.
http://en.wikipedia.org/wiki/C_preprocessor
In this case, for example, that article is liable to leave the innocent
passer-by with a broken understanding of the C preprocessor. For
example, the second sentence in that article (as it was when I read it;
another problem with Wikipedia is that it is nearly impossible to
discuss any one article, since it may change behind the back of the
debaters) is already wrong on two counts.

That's nothing! I once got a book out of the library and *it* was wrong. I
don't remember what book it was or what it said but it was definitely wrong
and so I have made it a point of avoiding the library ever since. Now, I
get most of my information from guys I strike up conversations with in
Starbucks.
Be careful. They'll probably advise you to consult Wikipedia on
technical questions, and then you'll be worse off than when you started.

Richard
Mar 8 '07 #12

P: n/a
Mark McIntyre wrote:
On Wed, 07 Mar 2007 13:59:35 -0500, in comp.lang.c , Clever Monkey
<cl**************@hotmail.com.invalidwrote:
>Like any encyclopedia, it is going to be incomplete, generalized and
open to argument. Wikipedia has roughly the same rate of error as other
printed encyclopedia; the types of errors are slightly different.

You're thinking of the so-called analysis carried out last year by
Nature. This was an extremely restrictive study and is considered at
best to be true only of the objectively measurable articles eg
science, technology or history. Anything subjective - eg biography,
politics, religion - is IMHO highly unreliable.
I disagree. The analysis was very clear and the methodology was as
sound as one can expect from a short overview comparing specific subjects.
>This is, in fact, all we really ask of encyclopedia.

I ask somewhat more, frankly. I expect articles to be factual,
researched, verifiable and devoid of hearsay, rumour, opinion and
redisseminated misinformation.
Then you will have to do without, say, the Encyclopaedia Britannica,
which is known (we've both read the analysis above, and there are
excellent links to obviously wrong entries in printed encyclopedias that
have persisted for years, usually due to good old-fashioned plagiarism)
to have many factual errors that have persisted through several
editions, as well as the usual assortment of editorial slant that any
such collection of articles will suffer from.

The different model that Wikipedia employs vs. traditional encyclopedia
means different errors, not significantly more or less errors.

For an overview of a technical issue like cpp, pretty much any source is
fine. Augmenting this information with other sources to flesh things
out and cross-reference for errors is something we should all be doing.

Like I said, even my copy of K&R and the ISO C standard is wrong or
misleading on some accounts. Doing our best to ensure that facts are
researched, verifiable and devoid of hearsay is great; expecting that we
can /ever/ attain any sort of perfection in /any/ forum is unrealistic.

If the assertion is that, say, the Encyclopaedia Britannica is, on the
whole, "accurate, factual and verifiable" than Wikipedia then I have no
choice but to disagree. I'll take a global, personal perspective on
some subjects over a white, male prerogative any day of the week.

On the subject matter at hand, the C Preprocessor, it is likely that
Wikipedia has simply borrowed an old or incorrect report from some
previously published account, much like other sources (printed or not).

The difference is that some of the smart cookies here could offer
corrections to the text, which would be check, reviewed and accepted in
a matter of hours, usually.

Try that with the ISO C standard.

As a starting point, I will say again that starting with a Google search
that gets you to Wikipedia is not a bad way to start -- at least it will
give you better search terms. We go through life rationalizing bad or
missing information. An easy first error is assuming that some
particular source is definitive.
Mar 9 '07 #13

P: n/a
On Fri, 09 Mar 2007 16:03:48 -0500, in comp.lang.c , Clever Monkey
<cl**************@hotmail.com.invalidwrote:
>Mark McIntyre wrote:
>On Wed, 07 Mar 2007 13:59:35 -0500, in comp.lang.c , Clever Monkey
<cl**************@hotmail.com.invalidwrote:
You're thinking of the so-called analysis carried out last year by
Nature.
I disagree. The analysis was very clear and the methodology was as
sound as one can expect from a short overview comparing specific subjects.
Bollocks. I'm sorry, but if you really think that, you have no clue
how a proper scientific analysis of such data should be carried out.
>Then you will have to do without, say, the Encyclopaedia Britannica,
which is known to have many factual errors
Sure, in the small set of articles chosen by the Nature journalists
(nb not scientists). And unlike Wikipedia, the EB is subject to
peer-review by people who are actually knowledgeable, as opposed to by
anyone who recently read a sunday supplement or airport blockbuster.

By the way the article was /NOT/ a submitted paper, it was in the
editorial section of the magazine, written by journalists, and should
under no circumstances be confused with actual reviewed and
authenticated research.
>I'll take a global, personal perspective on
some subjects over a white, male prerogative any day of the week.
And may the Tower of Babel lean on you too. Your remark above by the
way is marginally racist & sexist and probably prejudiced against
intellectual study, though I'm not sure you intended it to be any of
those per se.

I'm saying nothing more on this topic.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Mar 9 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.