<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Suse &#38; OpenSuse Tips &#187; compiler</title>
	<atom:link href="http://www.susetips.com/tag/compiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.susetips.com</link>
	<description>Tricks, Guides, Tutorials, How Tos and Troubleshooting suse linux</description>
	<lastBuildDate>Tue, 30 Nov 2010 09:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Compiling C++ code using iostream in G++ version 4.3 and above</title>
		<link>http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/</link>
		<comments>http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 09:07:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GCC]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[compiler]]></category>

		<guid isPermaLink="false">http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/</guid>
		<description><![CDATA[In the past, prior to G++ version 4.3, a code like #include &#60;iostream.h&#62; int main() { &#160; cout &#60;&#60; “hello world” &#60;&#60; endl; &#160; return 0; } would probably compile&#160; (g++ &#60;filename.cpp&#62;) with the possibility of some warning messages.&#160; With version 4.3 and newer, it will give you an error message stating that iostream.h: No [...]<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /><br/><br/><a href="http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/">Compiling C++ code using iostream in G++ version 4.3 and above</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In the past, prior to G++ version 4.3, a code like</p>
<blockquote><p><font face="Courier New" size="2">#include &lt;iostream.h&gt;        <br />int main() {         <br />&#160; cout &lt;&lt; “hello world” &lt;&lt; endl;         <br />&#160; return 0;         <br />}</font></p>
</blockquote>
<p>would probably compile&#160; (<font face="Courier New" size="2">g++ &lt;filename.cpp&gt;</font>) with the possibility of some warning messages.&#160; With version 4.3 and newer, it will give you an error message stating that </p>
<blockquote><p><font face="Courier New" size="2">iostream.h: No such file or directory</font></p>
</blockquote>
<p> <span id="more-52"></span>
<p>There are mainly 2 changes here; (1) GCC 4.3 does not recognize <font face="Courier New" size="2">iostream.h</font> anymore and will comply with the latest C++ standards of using <font face="Courier New" size="2">iostream<font face="Verdana"> and (2) you will need to have “</font>using namespace std;<font face="Verdana">” at the top for it to recognize </font>iostream. </font></p>
<blockquote><p><font face="Courier New" size="2">using namespace std;        </p>
<p>#include &lt;iostream&gt;         <br />int main() {         <br />&#160; cout &lt;&lt; “hello world” &lt;&lt; endl;         <br />&#160; return 0;         <br />}</font></p>
</blockquote>
<p>And compile it with <font face="Courier New" size="2">g++</font>.</p>
<p>This is only <font color="#ff0000"><strong>IF</strong></font> you have not been following proper C++ standards and especially so, when you mix C and C++ code together.&#160; If you did learned to code C++ properly, you would not have such an issue anyway.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4709064562032853";
/* 300x250, created 5/8/09 */
google_ad_slot = "9311445083";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Post from: <a href="http://www.susetips.com">Suse & OpenSuse Tips</a><br />
-----------------------------------------------------------------------<br /><br/><br/><a href="http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/">Compiling C++ code using iostream in G++ version 4.3 and above</a></p>
<p>---<br />Related Articles at Suse &amp; OpenSuse Tips:<ul><li><a href="http://www.susetips.com/2010/11/19/beginners-guide-to-compiling-kernel-on-opensuse-11-3/" rel="bookmark" title="Permanent Link: Beginners Guide to Compiling Kernel on OpenSuSE 11.3">Beginners Guide to Compiling Kernel on OpenSuSE 11.3</a></li><li><a href="http://www.susetips.com/2010/11/03/installing-google-chromium-on-opensuse-11-3/" rel="bookmark" title="Permanent Link: Installing Google Chromium on OpenSuSE 11.3">Installing Google Chromium on OpenSuSE 11.3</a></li><li><a href="http://www.susetips.com/2010/06/05/meego-v1-0-preview-to-suse-meego/" rel="bookmark" title="Permanent Link: MeeGo v1.0: Preview to SuSE MeeGo">MeeGo v1.0: Preview to SuSE MeeGo</a></li><li><a href="http://www.susetips.com/2009/12/22/how-to-run-windows-software-on-opensuse/" rel="bookmark" title="Permanent Link: How to run Windows software on OpenSuse">How to run Windows software on OpenSuse</a></li><li><a href="http://www.susetips.com/2009/09/12/opensuse-11-1-kde4-reloaded/" rel="bookmark" title="Permanent Link: Opensuse 11.1 KDE4 Reloaded">Opensuse 11.1 KDE4 Reloaded</a></li></ul></p><br />]]></content:encoded>
			<wfw:commentRss>http://www.susetips.com/2009/03/12/compiling-c-code-using-iostream-in-g-version-43-and-above/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

