﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Carrie--认清目标，坚持到底，永不放弃！</title><link>http://www.cppblog.com/Carriexiaxia/</link><description /><language>zh-cn</language><lastBuildDate>Wed, 08 Apr 2026 09:55:06 GMT</lastBuildDate><pubDate>Wed, 08 Apr 2026 09:55:06 GMT</pubDate><ttl>60</ttl><item><title>Java类</title><link>http://www.cppblog.com/Carriexiaxia/archive/2014/03/24/206317.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Mon, 24 Mar 2014 14:05:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2014/03/24/206317.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/206317.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2014/03/24/206317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/206317.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/206317.html</trackback:ping><description><![CDATA[java的虚函数，抽象类，
<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/206317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2014-03-24 22:05 <a href="http://www.cppblog.com/Carriexiaxia/archive/2014/03/24/206317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于memset函数，按位与 操作函数</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/25/196622.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Tue, 25 Dec 2012 13:27:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/25/196622.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196622.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/25/196622.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196622.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196622.html</trackback:ping><description><![CDATA[memset第二个参数是字节<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196622.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-25 21:27 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/25/196622.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>看电视剧《甄嬛传》</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196093.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Fri, 07 Dec 2012 13:21:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196093.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196093.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196093.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196093.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196093.html</trackback:ping><description><![CDATA[愿逆风如解意，容易莫摧残。

起初的甄嬛真是单纯，惹人怜爱，

到了后来，卷入后宫的纷争，纠葛之中，变得心狠手辣，让人讨厌。<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196093.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-07 21:21 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196093.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C语言编程（三）</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196092.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Fri, 07 Dec 2012 13:13:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196092.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196092.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196092.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196092.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196092.html</trackback:ping><description><![CDATA[今天做了这样一个实验
定义了一个结构体数组，居然编译不过，百思不得其解，百度后得释。

typedef struct tagTDefStruct
{
    int a[10];
}TDefStruct[10];

memset(TDefStruct, 0, 10*sizeof(TDefStruct));       -----这个到底要怎么初始化 memset(TDefStruct, 0, sizeof(TDefStruct));?????

编译出现错误:parse error before 。。。

这是为啥呢？我看人家代码就是这样写的呢，可以正常运行啊，为什么连编译都不过。

百度结果：
这证明你使用的编译器只支持C89标准。
这个C标准要求在一个块内的变量的声明放在所有非声明语句的前面。
C99及C++标准无此限制。

之后，
就把代码改成如下方式：
typedef struct tagTDefStruct
{
    int a[10];
}TDefStruct;

TDefStruct tDefStruct[10];
memset(tDefStruct, 0, 10*sizeof(TDefStruct));  

OK 编译通过。  <img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196092.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-07 21:13 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196092.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读小说《安德海》</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196091.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Fri, 07 Dec 2012 12:59:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196091.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196091.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196091.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196091.html</trackback:ping><description><![CDATA[安德海这个人也是戏剧性的一生。

小的时候因为被人欺凌，穷怕了，看到告老还乡的老太监风风光光的，打小便萌生了当太监的志向。

尽管这样的志向让常人无法理解，后来却因为这儿时小小的志向而大放光彩。<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-07 20:59 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196091.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读四大名著---《三国演义》</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196090.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Fri, 07 Dec 2012 12:52:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196090.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196090.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196090.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196090.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196090.html</trackback:ping><description><![CDATA[刘、关、张桃园结义，为了共同的抱负和志向。
所谓时势造英雄，还是英雄造时势呢？

小时候看三国演义，总是看不懂啊。
最佩服的是诸葛亮，神机妙算，料事如神，又懂得观天象。

周瑜这个人，个性太强，心胸狭窄。智慧肯定是有的。

大江东去，浪淘尽，滚滚长江东流水。<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196090.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-07 20:52 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196090.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读《董晓婉》记</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196088.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Fri, 07 Dec 2012 12:12:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196088.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196088.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196088.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196088.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196088.html'>阅读全文</a><img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-07 20:12 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/07/196088.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C语言编程（二）---1.关于指针，指针作为函数形参，实参；2.指针和数组的关系，相互赋值；3.memset用于结构体</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/06/196052.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Thu, 06 Dec 2012 12:16:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/06/196052.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196052.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/06/196052.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196052.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196052.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/Carriexiaxia/archive/2012/12/06/196052.html'>阅读全文</a><img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-06 20:16 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/06/196052.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>内存</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196024.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Wed, 05 Dec 2012 14:32:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196024.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196024.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196024.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196024.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196024.html</trackback:ping><description><![CDATA[动态内存
静态内存

地址空间。<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196024.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-05 22:32 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196024.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>大端模式 小端模式</title><link>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196023.html</link><dc:creator>Carrie</dc:creator><author>Carrie</author><pubDate>Wed, 05 Dec 2012 14:31:00 GMT</pubDate><guid>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196023.html</guid><wfw:comment>http://www.cppblog.com/Carriexiaxia/comments/196023.html</wfw:comment><comments>http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196023.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Carriexiaxia/comments/commentRss/196023.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Carriexiaxia/services/trackbacks/196023.html</trackback:ping><description><![CDATA[ 大端模式:
低地址放高字节
高地址放低字节<img src ="http://www.cppblog.com/Carriexiaxia/aggbug/196023.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Carriexiaxia/" target="_blank">Carrie</a> 2012-12-05 22:31 <a href="http://www.cppblog.com/Carriexiaxia/archive/2012/12/05/196023.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>