<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C语言中利用strstr函数进行字符串分割</title>
	<atom:link href="http://blog.minidx.com/2008/02/03/470.html/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minidx.com/2008/02/03/470.html</link>
	<description>中文Adobe Flex例子,Flex实例教程,RIA资源,全文检索技术,算法和数据结构</description>
	<lastBuildDate>Thu, 18 Mar 2010 13:20:59 +0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 示例错误</title>
		<link>http://blog.minidx.com/2008/02/03/470.html/comment-page-1#comment-15341</link>
		<dc:creator>示例错误</dc:creator>
		<pubDate>Fri, 05 Mar 2010 05:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/470.html#comment-15341</guid>
		<description>原因分析：
char *haystack=”aaa&#124;&#124;a&#124;&#124;bbb&#124;&#124;c&#124;&#124;ee&#124;&#124;”;
定义，”aaa&#124;&#124;a&#124;&#124;bbb&#124;&#124;c&#124;&#124;ee&#124;&#124;”为静态存储区的常量值，此值不能被修改。
如果此值在变量区，则程序正确。</description>
		<content:encoded><![CDATA[<p>原因分析：<br />
char *haystack=”aaa||a||bbb||c||ee||”;<br />
定义，”aaa||a||bbb||c||ee||”为静态存储区的常量值，此值不能被修改。<br />
如果此值在变量区，则程序正确。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 示例错误</title>
		<link>http://blog.minidx.com/2008/02/03/470.html/comment-page-1#comment-15340</link>
		<dc:creator>示例错误</dc:creator>
		<pubDate>Fri, 05 Mar 2010 05:52:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/470.html#comment-15340</guid>
		<description>#include  
#include   
  
int main(int argc,char **argv) 
{
char temp[10];
char *haystack=&quot;aaa&#124;&#124;a&#124;&#124;bbb&#124;&#124;c&#124;&#124;ee&#124;&#124;&quot;; 
char *needle=&quot;&#124;&#124;&quot;; 
char* buf = strstr( haystack, needle); 
while( buf != NULL ) 
{ 
   // buf[0]=&#039;&#039;;  替换为
   strncpy(temp, haystack, buf-haystack);
    temp[buf-haystack] =0;
    printf( &quot;%s\n &quot;, temp); //haystack); 

    haystack = buf + strlen(needle); 
    /* Get next token: */ 
    buf = strstr( haystack, needle); 
} 
   return 0; 
}</description>
		<content:encoded><![CDATA[<p>#include<br />
#include   </p>
<p>int main(int argc,char **argv)<br />
{<br />
char temp[10];<br />
char *haystack=&#8221;aaa||a||bbb||c||ee||&#8221;;<br />
char *needle=&#8221;||&#8221;;<br />
char* buf = strstr( haystack, needle);<br />
while( buf != NULL )<br />
{<br />
   // buf[0]=&#8221;;  替换为<br />
   strncpy(temp, haystack, buf-haystack);<br />
    temp[buf-haystack] =0;<br />
    printf( &#8220;%s\n &#8220;, temp); //haystack); </p>
<p>    haystack = buf + strlen(needle);<br />
    /* Get next token: */<br />
    buf = strstr( haystack, needle);<br />
}<br />
   return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 陈成</title>
		<link>http://blog.minidx.com/2008/02/03/470.html/comment-page-1#comment-12422</link>
		<dc:creator>陈成</dc:creator>
		<pubDate>Fri, 07 Aug 2009 08:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/470.html#comment-12422</guid>
		<description>删除 buf[0]=&#039;&#039;;</description>
		<content:encoded><![CDATA[<p>删除 buf[0]=&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tw</title>
		<link>http://blog.minidx.com/2008/02/03/470.html/comment-page-1#comment-12223</link>
		<dc:creator>tw</dc:creator>
		<pubDate>Sat, 18 Jul 2009 08:27:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/470.html#comment-12223</guid>
		<description>char *haystack=&quot;aaa&#124;&#124;a&#124;&#124;bbb&#124;&#124;c&#124;&#124;ee&#124;&#124;&quot;;  
haystack是字符串常量
 buf[0]=&#039;&#039;; 
试图修改字符串常量，会有问题。</description>
		<content:encoded><![CDATA[<p>char *haystack=&#8221;aaa||a||bbb||c||ee||&#8221;;<br />
haystack是字符串常量<br />
 buf[0]=&#8221;;<br />
试图修改字符串常量，会有问题。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Minidxer</title>
		<link>http://blog.minidx.com/2008/02/03/470.html/comment-page-1#comment-11037</link>
		<dc:creator>Minidxer</dc:creator>
		<pubDate>Fri, 27 Mar 2009 00:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/470.html#comment-11037</guid>
		<description>什么错误信息？</description>
		<content:encoded><![CDATA[<p>什么错误信息？</p>
]]></content:encoded>
	</item>
</channel>
</rss>
