 
    
<?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>missing Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/missing/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/missing/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Tue, 19 Mar 2013 08:38:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Programming Error &#8211; Unintended String Concatenation</title>
		<link>https://complete-concrete-concise.com/programming/c/programming-error-unintended-string-concatenation/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Tue, 19 Mar 2013 08:38:42 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[comma]]></category>
		<category><![CDATA[concatenation]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2699</guid>

					<description><![CDATA[<p>In an effort to be helpful, C and C++ compilers concatenate adjacent strings together. In the following example, the compiler will concatenate the two strings into a single string: printf("This is a string " "and this is another string."); Which is probably what you intended anyway. Because C and C++ are free form languages, adjacent [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/programming/c/programming-error-unintended-string-concatenation/">Programming Error &#8211; Unintended String Concatenation</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In an effort to be helpful, C and C++ compilers concatenate adjacent strings together.</p>
<p>In the following example, the compiler will concatenate the two strings into a single string:</p>
<pre><code>printf("This is a string " "and this is another string.");</code></pre>
<p>Which is probably what you intended anyway.</p>
<p>Because C and C++ are free form languages, adjacent strings can appear in many different formats &#8211; as this string table shows:</p>
<pre><code>char *array[] = {
    "str_1",
    "str_2",
    "str_3"
    "str_4",
    "str_5",
    NULL};</code></pre>
<p>Did you notice the missing comma (,) after <code>"str_3"</code>? It can be a hard one to spot.</p>
<p>This is the type of bug that can result in something like a simple parser failing:</p>
<pre><code>if (strcmp(array[i], test_string) == 0)</code></pre>
<p>because <code>str_3</code> and <code>str_4</code> will never be matched, but the others will.</p>

<p>The post <a href="https://complete-concrete-concise.com/programming/c/programming-error-unintended-string-concatenation/">Programming Error &#8211; Unintended String Concatenation</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
