<?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>compile errors | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/compile-errors/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Wed, 29 Apr 2020 21:47:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>compile errors | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>1566 Compile errors with just two characters!</title>
		<link>https://learncgames.com/1566-compile-errors-with-just-two-characters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=1566-compile-errors-with-just-two-characters</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sun, 10 May 2020 23:00:50 +0000</pubDate>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[compile errors]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=560</guid>

					<description><![CDATA[<p>When programmers have to explain why it took longer to get something working,you don&#8217;t often here reasons like this. A simple syntax error error took me an hour to find and fix. Yet it does happen and it happened to me today. Oh sure you feel silly afterwards and it was only a 131 lines [&#8230;]</p>
The post <a href="https://learncgames.com/1566-compile-errors-with-just-two-characters/">1566 Compile errors with just two characters!</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignleft size-full wp-image-561" src="https://learncgames.com/wp-content/uploads/2020/04/1566-compile-errors.png" alt="1500 compile errors" width="692" height="295" srcset="https://learncgames.com/wp-content/uploads/2020/04/1566-compile-errors.png 692w, https://learncgames.com/wp-content/uploads/2020/04/1566-compile-errors-300x128.png 300w" sizes="(max-width: 692px) 100vw, 692px" />When programmers have to explain why it took longer to get something working,you don&#8217;t often here reasons like this. A simple syntax error error took me an hour to find and fix. Yet it does happen and it happened to me today.</p>
<p>Oh sure you feel silly afterwards and it was only a 131 lines of C code. The very last of the 1566 compile errors was unexpected end-of-file found on line 132. That was a red herring of sorts. The error actually occurred right at the start of the program.</p>
<p>Here&#8217;s the first 10 lines. It should be quite easy to spot but when you are looking through 130 lines with a hint that it&#8217;s messed up the end of the file, it&#8217;s not so obvious.</p>
<pre><code class="language-c" data-line="">// tictactoe.c
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string&gt;
#include &lt;time.h&gt;

int playerIsX, computerFirst, x, y, danger, turn;
char board[3][3];  // holds X, O and space
char playerPiece, computerPiece;</code></pre>
<p>In case you haven&#8217;t spotted it, it&#8217;s the missing .h; it should be string.h not string in that 3rd #include. An obvious-in-hindsight clue is the error listing. The files that are mentioned don&#8217;t have .h on them.  (cctype, cstdint etc. Those are C++ files and string is a C++ header file. Also mention of namespace in the error message is also a big hint.</p>
<p>Still I think that sets a record for the most errors generated in a C compile! The compiler btw was Visual Studio 2019&#8217;s C/C++ compiler.</p>The post <a href="https://learncgames.com/1566-compile-errors-with-just-two-characters/">1566 Compile errors with just two characters!</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">560</post-id>	</item>
	</channel>
</rss>
