<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>&#39;NULL&#39; undeclared...</title>
		<link>http://www.allegro.cc/forums/view/332697</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 06 Feb 2004 10:50:43 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I Wrote a class which includes an pointer to the next Object of the same class. It worked fine. Then i tried to place the class in it&#39;s own header h. + .cpp file. Now when i&#39;m trying to compile, i&#39;m getting the following error:(I&#39;m Using Dev cpp)</p><p>`NULL&#39; undeclared (first use this function)</p><p>(I&#39;m using NULL in the constructor for the pointer to the next Object)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Denis Sinner)</author>
		<pubDate>Fri, 06 Feb 2004 02:29:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Include a standard header perhaps?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Fri, 06 Feb 2004 02:44:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I would venture the following guess. One of the .cpp files that includes the .h file includes it before including anything else (like &lt;stdlib.h&gt; and so forth). You should include your standard library headers first.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Korval)</author>
		<pubDate>Fri, 06 Feb 2004 02:44:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I know this makes a difference with Visual Studio, but I&#39;m not sure about DevCpp.</p><p>Try renaming the .h file to .hpp</p><p>NULL is not declared in C, but is in C++, if I remember correctly.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Radagar)</author>
		<pubDate>Fri, 06 Feb 2004 03:58:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could just do:
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#ifndef NULL</span>
<span class="p">#define NULL 0</span>
<span class="p">#endif</span>
</pre></div></div><p>

Radagar: NULL is declared in standard header files.  I&#39;m not sure why .h -&gt; .hpp would do anything at all ... it sounds silly.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 06 Feb 2004 04:09:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m wondering why no one ranted yet... [url <a href="http://www.allegro.cc/forums/view_thread.php?_id=331783">http://www.allegro.cc/forums/view_thread.php?_id=331783</a>]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Billybob)</author>
		<pubDate>Fri, 06 Feb 2004 04:20:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Yeah, I was about to link that <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />Almost certianly, that&#39;s his problem.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (23yrold3yrold)</author>
		<pubDate>Fri, 06 Feb 2004 04:45:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Radagar: NULL is declared in standard header files. I&#39;m not sure why .h -&gt; .hpp would do anything at all ... it sounds silly. 
</p></div></div><p>

He didn&#39;t include any standard header files first off, secondly there&#39;s a difference between c and cpp files.</p><p>And ofcourse, read the link.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Fri, 06 Feb 2004 07:39:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>He didn&#39;t include any standard header files first off, secondly there&#39;s a difference between c and cpp files.</p></div></div><p>I know both these things, I&#39;ve read the link (before reading this thread, actually), and your post has no relevance whatsoever to what you quoted.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 06 Feb 2004 08:07:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The &quot;And ofcourse, read the link.&quot; part was for the OP.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Fri, 06 Feb 2004 08:12:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>NULL is declared in &lt;stddef.h&gt; under C and &lt;cstddef&gt; under C++.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Surt)</author>
		<pubDate>Fri, 06 Feb 2004 10:50:43 +0000</pubDate>
	</item>
</rss>
