<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 1.10 &#8212; A first look at the preprocessor</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/</link>
	<description></description>
	<lastBuildDate>Sat, 13 Mar 2010 15:41:52 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rukshan</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-79174</link>
		<dc:creator>Rukshan</dc:creator>
		<pubDate>Fri, 26 Feb 2010 23:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-79174</guid>
		<description>Would you kindly write “// your declarations here” part to make it clear. Because I still don’t get the use of “mymath.h” here.</description>
		<content:encoded><![CDATA[<p>Would you kindly write “// your declarations here” part to make it clear. Because I still don’t get the use of “mymath.h” here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prashant ganesha</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-79068</link>
		<dc:creator>prashant ganesha</dc:creator>
		<pubDate>Thu, 25 Feb 2010 15:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-79068</guid>
		<description>this is just awesome teacher...made programming lot easier..thank u fellows..!</description>
		<content:encoded><![CDATA[<p>this is just awesome teacher&#8230;made programming lot easier..thank u fellows..!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rukshan</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-79035</link>
		<dc:creator>Rukshan</dc:creator>
		<pubDate>Thu, 25 Feb 2010 06:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-79035</guid>
		<description>Hi,

Would you kindly write &quot;// your declarations here&quot; part to make it clear. Because I still don&#039;t get the use of &quot;mymath.h&quot; here. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Would you kindly write &#8220;// your declarations here&#8221; part to make it clear. Because I still don&#8217;t get the use of &#8220;mymath.h&#8221; here. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rukshan</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-79034</link>
		<dc:creator>Rukshan</dc:creator>
		<pubDate>Thu, 25 Feb 2010 06:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-79034</guid>
		<description>Hi Alex,

Thanks for sharing your knowledge. I have question about using headers. In lesson 1.9 you did not use 
#include &quot;add.h&quot; in the header file but when explaining header guards you used &quot;mymath.h&quot; in the header file. I&#039;m sorry I&#039;m confused. What&#039;s the point of using &quot;mymath.h&quot; if its not defined. 

regards,
Rukshan.</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>Thanks for sharing your knowledge. I have question about using headers. In lesson 1.9 you did not use<br />
#include &#8220;add.h&#8221; in the header file but when explaining header guards you used &#8220;mymath.h&#8221; in the header file. I&#8217;m sorry I&#8217;m confused. What&#8217;s the point of using &#8220;mymath.h&#8221; if its not defined. </p>
<p>regards,<br />
Rukshan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: retro-starr</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-76728</link>
		<dc:creator>retro-starr</dc:creator>
		<pubDate>Mon, 18 Jan 2010 20:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-76728</guid>
		<description>Is there anything wrong with typing the headers in lowercase and with spaces (I still use underscores though)? I tested it out earlier when I was making another program that used a header and it still worked. If there&#039;s nothing wrong, I stylistically like the lowercase.</description>
		<content:encoded><![CDATA[<p>Is there anything wrong with typing the headers in lowercase and with spaces (I still use underscores though)? I tested it out earlier when I was making another program that used a header and it still worked. If there&#8217;s nothing wrong, I stylistically like the lowercase.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iamone</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-75128</link>
		<dc:creator>iamone</dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-75128</guid>
		<description>Hey Alex great tutorial!
 i was just wondering why #define Print_joe
was not just #define joe?
Doesn&#039;t the word Print throw the whole thing off?
This question has been really bugging me, any answer would be appreciated 

THANKS!</description>
		<content:encoded><![CDATA[<p>Hey Alex great tutorial!<br />
 i was just wondering why #define Print_joe<br />
was not just #define joe?<br />
Doesn&#8217;t the word Print throw the whole thing off?<br />
This question has been really bugging me, any answer would be appreciated </p>
<p>THANKS!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prabhakar</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-73224</link>
		<dc:creator>prabhakar</dc:creator>
		<pubDate>Sat, 28 Nov 2009 11:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-73224</guid>
		<description>please treat my comment as cancelled prabhakar</description>
		<content:encoded><![CDATA[<p>please treat my comment as cancelled prabhakar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prabhakar</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-73222</link>
		<dc:creator>prabhakar</dc:creator>
		<pubDate>Sat, 28 Nov 2009 11:26:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-73222</guid>
		<description>i am confused by the explanation, &quot;identifier&#039;  and  &quot;replacement&quot;. u have said [ define identifier replacement ]whereas in the example given to replace 122, i fail to understand this.
the identifier is YEN_PER_DOLLAR and replacement is 122 as per the define mode GIVEN ABOVE.
so how can 122 be replaced? by YEN_PER_DOLLAR?

#define YEN_PER_DOLLAR  122
int nYen = nDollars * YEN_PER_DOLLAR;

I AM VERY NEW TO C++ SO BE CONSIDERATE AND EXPLAIN
THANKS  PRABHAKAR</description>
		<content:encoded><![CDATA[<p>i am confused by the explanation, &#8220;identifier&#8217;  and  &#8220;replacement&#8221;. u have said [ define identifier replacement ]whereas in the example given to replace 122, i fail to understand this.<br />
the identifier is YEN_PER_DOLLAR and replacement is 122 as per the define mode GIVEN ABOVE.<br />
so how can 122 be replaced? by YEN_PER_DOLLAR?</p>
<p>#define YEN_PER_DOLLAR  122<br />
int nYen = nDollars * YEN_PER_DOLLAR;</p>
<p>I AM VERY NEW TO C++ SO BE CONSIDERATE AND EXPLAIN<br />
THANKS  PRABHAKAR</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boy65</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-70831</link>
		<dc:creator>Boy65</dc:creator>
		<pubDate>Thu, 22 Oct 2009 19:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-70831</guid>
		<description>Student pairs are assigned a particular area on the grid and then walk through the area, taking detailed notes and looking for specific youth-related opportunities and services. ,</description>
		<content:encoded><![CDATA[<p>Student pairs are assigned a particular area on the grid and then walk through the area, taking detailed notes and looking for specific youth-related opportunities and services. ,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/comment-page-1/#comment-69534</link>
		<dc:creator>William</dc:creator>
		<pubDate>Fri, 02 Oct 2009 20:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=33#comment-69534</guid>
		<description>First, thank you so much, Alex for your excellent tutorial. Having previously been a developer in  Assembler, COBOL and C from the decade of the 80&#039;s (left the field in 1990), I can truly appreciate the hard work and excellence you have shared with us all. I find your sight so far to be a wonderful opportunity for me to once again explore the world of programming thru C++.

My question: 
These last two entries by baldo and Prayrit, baldo indicates that Prayrit&#039;s code should be the full example for header guards. Since you did not reply, I assume you do agree.

I also take note of your explanation that the compiler will check the function prototypes that have been declared via the add.h and subtract.h #includes against the function calls within the source code to resolve any syntactical errors and it will be the job of the linker to ensure that all the function calls are eventually defined.

Having said all that, I am not quite sure of the purpose of &#039;mymath.h&#039;. The comment in the header file says &quot;// your declarations here&quot;. Is it additional math declarations (eg. division() or multiplication()prototypes)or was it supposed to be the &#039;definitions&#039; for the add() and subtract() functions. I assumed it to be the latter.

If mymath.h does in this particular case contain the definitions for add() and subtract(), then when it compiles, wouldn&#039;t the compiler not only insert the add() and subtract() function prototypes for declaration within main.cpp but because of the #include of mymath.h within the add.h and subtract.h files, also insert the function definitions of add() and subtract() I assume to be located therin, thereby causing compiling errors?

Finally, if mymath.h does not contain the definitions, then where are the definitions in this case, and what is mymath.h doing?</description>
		<content:encoded><![CDATA[<p>First, thank you so much, Alex for your excellent tutorial. Having previously been a developer in  Assembler, COBOL and C from the decade of the 80&#8217;s (left the field in 1990), I can truly appreciate the hard work and excellence you have shared with us all. I find your sight so far to be a wonderful opportunity for me to once again explore the world of programming thru C++.</p>
<p>My question:<br />
These last two entries by baldo and Prayrit, baldo indicates that Prayrit&#8217;s code should be the full example for header guards. Since you did not reply, I assume you do agree.</p>
<p>I also take note of your explanation that the compiler will check the function prototypes that have been declared via the add.h and subtract.h #includes against the function calls within the source code to resolve any syntactical errors and it will be the job of the linker to ensure that all the function calls are eventually defined.</p>
<p>Having said all that, I am not quite sure of the purpose of &#8216;mymath.h&#8217;. The comment in the header file says &#8220;// your declarations here&#8221;. Is it additional math declarations (eg. division() or multiplication()prototypes)or was it supposed to be the &#8216;definitions&#8217; for the add() and subtract() functions. I assumed it to be the latter.</p>
<p>If mymath.h does in this particular case contain the definitions for add() and subtract(), then when it compiles, wouldn&#8217;t the compiler not only insert the add() and subtract() function prototypes for declaration within main.cpp but because of the #include of mymath.h within the add.h and subtract.h files, also insert the function definitions of add() and subtract() I assume to be located therin, thereby causing compiling errors?</p>
<p>Finally, if mymath.h does not contain the definitions, then where are the definitions in this case, and what is mymath.h doing?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
