﻿<?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++博客-#ant-最新评论</title><link>http://www.cppblog.com/ant/CommentsRSS.aspx</link><description>The dreams in which I'm dying are the best I've ever had...</description><language>zh-cn</language><pubDate>Tue, 19 Aug 2008 02:12:00 GMT</pubDate><lastBuildDate>Tue, 19 Aug 2008 02:12:00 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/08/19/31886.html#59311</link><dc:creator>蚂蚁终结者</dc:creator><author>蚂蚁终结者</author><pubDate>Tue, 19 Aug 2008 02:12:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/08/19/31886.html#59311</guid><description><![CDATA[@zhengdu<br>你用的是哪个版本的VC ？VC6.0 ？<br><br>大概是你的编译器太老，不支持static const整形值的初始化语法，试试下面两种办法：<br><br>1. 将md5.h中的<br>    static const size_t BUFFER_SIZE = 1024;<br>    改为<br>    enum { BUFFER_SIZE = 1024 };<br><br>2. 将md5.h中的<br>    static const size_t BUFFER_SIZE = 1024;<br>    改为<br>    static const size_t BUFFER_SIZE;<br><br>    并在md5.cpp的<br>    MD5::MD5() {<br>        reset();<br>    }<br>    上面加上<br>    const size_t MD5::BUFFER_SIZE = 1024;<br> <img src ="http://www.cppblog.com/ant/aggbug/59311.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">蚂蚁终结者</a> 2008-08-19 10:12 <a href="http://www.cppblog.com/ant/archive/2008/08/19/31886.html#59311#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 你好,我编译你的代码后出现下面问题,能帮我看下吗?</title><link>http://www.cppblog.com/ant/archive/2008/08/18/31886.html#59284</link><dc:creator>zhengdu</dc:creator><author>zhengdu</author><pubDate>Mon, 18 Aug 2008 14:14:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/08/18/31886.html#59284</guid><description><![CDATA[--------------------Configuration: test - Win32 Debug--------------------<br>Compiling...<br>test.cpp<br>c:\documents and settings\administrator\桌面\md5\md5.h(47) : error C2258: illegal pure syntax, must be '= 0'<br>c:\documents and settings\administrator\桌面\md5\md5.h(47) : error C2252: 'BUFFER_SIZE' : pure specifier can only be specified for functions<br>c:\documents and settings\administrator\桌面\md5\md5.cpp(130) : error C2065: 'BUFFER_SIZE' : undeclared identifier<br>c:\documents and settings\administrator\桌面\md5\md5.cpp(130) : error C2057: expected constant expression<br>c:\documents and settings\administrator\桌面\md5\md5.cpp(130) : error C2466: cannot allocate an array of constant size 0<br>c:\documents and settings\administrator\桌面\md5\md5.cpp(130) : error C2133: 'buffer' : unknown size<br>执行 cl.exe 时出错.<br><br>test.obj - 1 error(s), 0 warning(s)<br><img src ="http://www.cppblog.com/ant/aggbug/59284.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">zhengdu</a> 2008-08-18 22:14 <a href="http://www.cppblog.com/ant/archive/2008/08/18/31886.html#59284#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/07/31/31886.html#57657</link><dc:creator>蔡火胜</dc:creator><author>蔡火胜</author><pubDate>Thu, 31 Jul 2008 09:07:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/31/31886.html#57657</guid><description><![CDATA[太好了，我喜欢这个东西！<img src ="http://www.cppblog.com/ant/aggbug/57657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">蔡火胜</a> 2008-07-31 17:07 <a href="http://www.cppblog.com/ant/archive/2008/07/31/31886.html#57657#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 从Win32 API封装Thread类[1]</title><link>http://www.cppblog.com/ant/archive/2008/07/25/31190.html#57177</link><dc:creator>Robinfoxnan</dc:creator><author>Robinfoxnan</author><pubDate>Fri, 25 Jul 2008 14:46:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/25/31190.html#57177</guid><description><![CDATA[看了楼主的TEA，和strlen觉得分析的很好，<br>但是，关于多线程，<br>在侯捷的《windows多线程程序设计》中说，建议不使用_beginthreadex之类纯API函数，原因是在使用了线程本地存储的函数，比如GetLastError()之类的函数后，运行库比如VC++，会帮你建立一些我们看不到的结构体，会容易导致内存泄露，建议使用AfxBeginThread()类，特定开发环境提供的函数或者类，比如CWinThread。<br>可以参考该书第8章！<img src ="http://www.cppblog.com/ant/aggbug/57177.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">Robinfoxnan</a> 2008-07-25 22:46 <a href="http://www.cppblog.com/ant/archive/2008/07/25/31190.html#57177#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/07/24/31886.html#57032</link><dc:creator>冰兰</dc:creator><author>冰兰</author><pubDate>Thu, 24 Jul 2008 03:22:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/24/31886.html#57032</guid><description><![CDATA[真的很好，嘻嘻，谢谢谢谢<img src ="http://www.cppblog.com/ant/aggbug/57032.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">冰兰</a> 2008-07-24 11:22 <a href="http://www.cppblog.com/ant/archive/2008/07/24/31886.html#57032#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/07/23/31886.html#56910</link><dc:creator>beejoy</dc:creator><author>beejoy</author><pubDate>Wed, 23 Jul 2008 01:15:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/23/31886.html#56910</guid><description><![CDATA[@MonkeyLin<br>不会有问题的。<img src ="http://www.cppblog.com/ant/aggbug/56910.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">beejoy</a> 2008-07-23 09:15 <a href="http://www.cppblog.com/ant/archive/2008/07/23/31886.html#56910#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: C++&amp;amp;Win32写的空当接龙</title><link>http://www.cppblog.com/ant/archive/2008/07/22/31234.html#56893</link><dc:creator>abc</dc:creator><author>abc</author><pubDate>Tue, 22 Jul 2008 14:09:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/22/31234.html#56893</guid><description><![CDATA[非常感谢共享！向你学习了！<img src ="http://www.cppblog.com/ant/aggbug/56893.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">abc</a> 2008-07-22 22:09 <a href="http://www.cppblog.com/ant/archive/2008/07/22/31234.html#56893#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/07/04/31886.html#55342</link><dc:creator>路缘</dc:creator><author>路缘</author><pubDate>Fri, 04 Jul 2008 06:50:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/07/04/31886.html#55342</guid><description><![CDATA[刚好用上，谢谢博主<img src ="http://www.cppblog.com/ant/aggbug/55342.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">路缘</a> 2008-07-04 14:50 <a href="http://www.cppblog.com/ant/archive/2008/07/04/31886.html#55342#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/06/23/31886.html#54405</link><dc:creator>蚂蚁终结者</dc:creator><author>蚂蚁终结者</author><pubDate>Mon, 23 Jun 2008 14:03:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/06/23/31886.html#54405</guid><description><![CDATA[@CPPLearning<br>谢谢提醒，是我的疏忽呵呵！<img src ="http://www.cppblog.com/ant/aggbug/54405.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">蚂蚁终结者</a> 2008-06-23 22:03 <a href="http://www.cppblog.com/ant/archive/2008/06/23/31886.html#54405#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/06/19/31886.html#54015</link><dc:creator>CPPLearning</dc:creator><author>CPPLearning</author><pubDate>Thu, 19 Jun 2008 07:00:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/06/19/31886.html#54015</guid><description><![CDATA[在2.2 Append Length 那块第二行：<br><br>“也就是说，此时的数据长度是16个字(32bit)的整数倍。”貌似应该是32bytes，:)<br><br><img src ="http://www.cppblog.com/ant/aggbug/54015.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">CPPLearning</a> 2008-06-19 15:00 <a href="http://www.cppblog.com/ant/archive/2008/06/19/31886.html#54015#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 非完美C++ Singleton实现[2]</title><link>http://www.cppblog.com/ant/archive/2008/05/06/31786.html#49056</link><dc:creator>蚂蚁终结者</dc:creator><author>蚂蚁终结者</author><pubDate>Tue, 06 May 2008 14:02:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/05/06/31786.html#49056</guid><description><![CDATA[@sodar<br>能说下在动态库工程中使用Singleton的具体需求吗？dll中用atexit注册的函数在FreeLibrary的时候会被调用，可以保证Singleton安全析构。<img src ="http://www.cppblog.com/ant/aggbug/49056.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">蚂蚁终结者</a> 2008-05-06 22:02 <a href="http://www.cppblog.com/ant/archive/2008/05/06/31786.html#49056#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 非完美C++ Singleton实现[2]</title><link>http://www.cppblog.com/ant/archive/2008/05/06/31786.html#48962</link><dc:creator>sodar</dc:creator><author>sodar</author><pubDate>Tue, 06 May 2008 01:21:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/05/06/31786.html#48962</guid><description><![CDATA[非常好的文章，学习了<br><br>可是遇到一个问题，如果我是在动态库工程中使用这个Singleton，因为atexit不能用于DLL，这种实现是不是会有问题呢？<img src ="http://www.cppblog.com/ant/aggbug/48962.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">sodar</a> 2008-05-06 09:21 <a href="http://www.cppblog.com/ant/archive/2008/05/06/31786.html#48962#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46810</link><dc:creator>redberries</dc:creator><author>redberries</author><pubDate>Fri, 11 Apr 2008 02:05:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46810</guid><description><![CDATA[//str[length&gt;&gt;1] = '\0' <br>呵呵<br><img src ="http://www.cppblog.com/ant/aggbug/46810.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">redberries</a> 2008-04-11 10:05 <a href="http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46810#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46809</link><dc:creator>redberries</dc:creator><author>redberries</author><pubDate>Fri, 11 Apr 2008 02:03:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46809</guid><description><![CDATA[写的不错，顶下，不过觉得如果把Updata()加个返回值判断是否成功可能会保险一点，还有就是下面的代码好像有点小问题，这个str的最后位置是不是应该放个'\0'啊,<br><br>// md5.cpp: line 321-332 <br>string MD5::bytesToHexString(const byte *input, size_t length) { <br>string str; <br>str.reserve(length &lt;&lt; 1); 　//str.reserve((length &lt;&lt; 1) + 1); <br>for(size_t i = 0; i &lt; length; i++) { <br>int t = input[i]; <br>int a = t / 16; <br>int b = t % 16; <br>str.append(1, HEX[a]); <br>str.append(1, HEX[b]); <br>} <br>str[length&gt;&gt;1] = '\0'<br>return str; <br>} <br><img src ="http://www.cppblog.com/ant/aggbug/46809.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">redberries</a> 2008-04-11 10:03 <a href="http://www.cppblog.com/ant/archive/2008/04/11/31886.html#46809#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: MD5算法的C++实现</title><link>http://www.cppblog.com/ant/archive/2008/03/14/31886.html#44419</link><dc:creator>蚂蚁终结者</dc:creator><author>蚂蚁终结者</author><pubDate>Fri, 14 Mar 2008 01:14:00 GMT</pubDate><guid>http://www.cppblog.com/ant/archive/2008/03/14/31886.html#44419</guid><description><![CDATA[@gg<br>其实具体的用法在源代码的main函数中已经演示得很清楚了，我想你也肯定没有看文章后面的：“2.计算文件的MD5值”这一段，专门计算md5值的软件如WinMD5是以二进制形式打开文件的，所以：<br><br>string s1 = MD5(ifstream(&quot;file&quot;)).toString();<br>string s2 = MD5(ifstream(&quot;file&quot;, ios::binary)).toString();<br><br>s1与s2是不一样的，前一个是以文本模式打开，后一个是以二进制模式打开。<br><img src ="http://www.cppblog.com/ant/aggbug/44419.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ant/" target="_blank">蚂蚁终结者</a> 2008-03-14 09:14 <a href="http://www.cppblog.com/ant/archive/2008/03/14/31886.html#44419#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>