<?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"
	>
<channel>
	<title>Comments on: 4.3 &#8212; File scope and the static keyword</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/</link>
	<description></description>
	<pubDate>Wed, 20 Aug 2008 08:27:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Hertz</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-19805</link>
		<dc:creator>Hertz</dc:creator>
		<pubDate>Thu, 26 Jun 2008 06:07:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-19805</guid>
		<description>Helped me a lot to understand the static keyword. The explanation is very clear and useful. Thanks.</description>
		<content:encoded><![CDATA[<p>Helped me a lot to understand the static keyword. The explanation is very clear and useful. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-18803</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 13 Jun 2008 18:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-18803</guid>
		<description>I'm a bit perplexed at your comment.  The discussion on file scoped variables on this tutorial is all of 6 sentences, the last of which explicitly discourages their use (in previous tutorials, I talk about the downsides of global variables).  The rest of this tutorial discusses fixed duration variables, which have a lot of utility in C++.

Most of these earlier tutorials cover topics that C++ inherits from C.  In my opinion, it's highly useful for developing programmers have a solid understanding of these concepts before trying to understand things like classes, inheritance, and templates.</description>
		<content:encoded><![CDATA[<p>I&#8217;m a bit perplexed at your comment.  The discussion on file scoped variables on this tutorial is all of 6 sentences, the last of which explicitly discourages their use (in previous tutorials, I talk about the downsides of global variables).  The rest of this tutorial discusses fixed duration variables, which have a lot of utility in C++.</p>
<p>Most of these earlier tutorials cover topics that C++ inherits from C.  In my opinion, it&#8217;s highly useful for developing programmers have a solid understanding of these concepts before trying to understand things like classes, inheritance, and templates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-18754</link>
		<dc:creator>Nicolas</dc:creator>
		<pubDate>Thu, 12 Jun 2008 15:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-18754</guid>
		<description>static at the file scope is a good idea in C, but it's very bad practice in C++ (I heard it's even deprecated). There are way better encapsulation mechanisms in C++.

This tutorial looks like a s/printf/cout/ approach at learning C++. It's actually teaching C with C++ syntax.</description>
		<content:encoded><![CDATA[<p>static at the file scope is a good idea in C, but it&#8217;s very bad practice in C++ (I heard it&#8217;s even deprecated). There are way better encapsulation mechanisms in C++.</p>
<p>This tutorial looks like a s/printf/cout/ approach at learning C++. It&#8217;s actually teaching C with C++ syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-17912</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sat, 31 May 2008 00:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-17912</guid>
		<description>You can't use them when they're inaccessible, but you can use them if and when they do become accessible again.  For example, each time IncrementAndPrint() is called, s_nValue comes back into scope with it's previous value.  This allows you to have a variable that keeps track of it's value between calls without exposing that variable to other functions (which is dangerous, because they might change it).</description>
		<content:encoded><![CDATA[<p>You can&#8217;t use them when they&#8217;re inaccessible, but you can use them if and when they do become accessible again.  For example, each time IncrementAndPrint() is called, s_nValue comes back into scope with it&#8217;s previous value.  This allows you to have a variable that keeps track of it&#8217;s value between calls without exposing that variable to other functions (which is dangerous, because they might change it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carmen</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-16032</link>
		<dc:creator>carmen</dc:creator>
		<pubDate>Tue, 13 May 2008 17:02:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-16032</guid>
		<description>well .. if they become inaccessible ... what's the point? We can't use them anyway ... can we?</description>
		<content:encoded><![CDATA[<p>well .. if they become inaccessible &#8230; what&#8217;s the point? We can&#8217;t use them anyway &#8230; can we?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 4.2 &#8212; Global variables</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-13458</link>
		<dc:creator>Learn C++ - &#187; 4.2 &#8212; Global variables</dc:creator>
		<pubDate>Tue, 29 Apr 2008 04:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-13458</guid>
		<description>[...]     Prev/Next Posts   &#171; 4.1 &#8212; Blocks (compound statements) and local variables &#124; Home &#124; 4.3 &#8212; File scope and the static keyword &#187;     Tuesday, June 19th, 2007 at 8:22 [...]</description>
		<content:encoded><![CDATA[<p>[...]     Prev/Next Posts   &laquo; 4.1 &#8212; Blocks (compound statements) and local variables | Home | 4.3 &#8212; File scope and the static keyword &raquo;     Tuesday, June 19th, 2007 at 8:22 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven H.</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-5053</link>
		<dc:creator>Steven H.</dc:creator>
		<pubDate>Thu, 27 Dec 2007 18:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-5053</guid>
		<description>[ Code moved to the &lt;a href="http://www.dev-spot.com/forums/index.php?topic=27.msg92#msg92"&gt;forum&lt;/a&gt; ]</description>
		<content:encoded><![CDATA[<p>[ Code moved to the <a href="http://www.dev-spot.com/forums/index.php?topic=27.msg92#msg92">forum</a> ]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 8.11 -- Static member variables</title>
		<link>http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-1178</link>
		<dc:creator>Learn C++ - &#187; 8.11 -- Static member variables</dc:creator>
		<pubDate>Fri, 14 Sep 2007 17:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/43-file-scope-and-the-static-keyword/#comment-1178</guid>
		<description>[...] the lesson on file scope and the static keyword, you learned that static variables keep their values and are not destroyed even after they go out [...]</description>
		<content:encoded><![CDATA[<p>[...] the lesson on file scope and the static keyword, you learned that static variables keep their values and are not destroyed even after they go out [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
