Talk:Understanding C++/Introduction

Distinction between including a header and a library
A library is translated (read: "compiled") object which is linked into the final object. A header is a source file, which mostly contains declarations and rarely have any definitions.

The tutorial says that the line #include includes a library -- which is not true. It includes a header. Understanding just what the preprocessor does when you #include a header is important. It most certainly does not include a library (nor link the final object with any library). Rather the preprocessor copies the header and replaces the #include directive with the content of the header and continues with the result.

While I don't think this much detail is needed for an introduction, I don't think the current "includes a library" mentality is good for anyone.


 * Agreed. I actually came here to make exactly that comment! Daviddoria (talk) 13:27, 27 June 2010 (UTC)