<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/yysdsyl" type="application/rss+xml" ref="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/yysdsyl" type="application/rss+xml"></fs:self_link><lastBuildDate>Tue, 08 Jul 2008 20:11:00 GMT</lastBuildDate><title>yysdsyl的专栏</title><item><title>c++动态加载dll中的类（用于实现依据字符串类名创建对象）</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91700892/1297359/1/item.html</link><wfw:comment>comments/2626109.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2626109.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2626109</trackback:ping><description>c++动态加载dll中的类（用于实现依据字符串类名创建对象）&lt;img src =&quot;aggbug/2626109.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 09 Jul 2008 04:11:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626109.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626109.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626109.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91700892/1297359</fs:itemid></item><item><title>C++ Dll</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698839/1297359/1/item.html</link><wfw:comment>comments/2626033.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2626033.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2626033</trackback:ping><description>&lt;p&gt;前言:为了介绍C#写界面，C++写算法的快捷开发方式，C#与C++的交互，首先介绍c++，C#内部的DLL，COM调用。&lt;br /&gt;&lt;br /&gt;一， 静态的Lib:静态的lib经过编译后只有.h和.lib文件，没有dll，因为实现部分也包含在lib中，这就是与动态dll的区别。还有在写静态lib的时候不需要在使用导出关键字_declspec(dllexport)。一般有2中方法调用静态lib，如下实例：&lt;/p&gt;&lt;p&gt;静态lib：CPPLib-&amp;gt;test.h&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #&lt;img src =&quot;aggbug/2626033.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 09 Jul 2008 03:43:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626033.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626033.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626033.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698839/1297359</fs:itemid></item><item><title>用python来嗅探QQ号码</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698840/1297359/1/item.html</link><wfw:comment>comments/2615374.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2615374.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2615374</trackback:ping><description>&lt;p&gt;&lt;font face=&quot;courier new&quot;&gt;QQ使用udp协议来和服务器进行通讯，当数据包在传输的时候。udp报文被抓了下来。而登陆包是以0x02开头0x03为结尾的，我们先判断是否为正确的登陆包，当然，登陆包的长度都为102个字节。我们取出结构中特定的位置，就是你的QQ号码了&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face=&quot;courier new&quot;&gt;# -*- coding: cp936 -*-&lt;br /&gt;&lt;br /&gt;import pcap ,struct&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;pack=pcap.pcap() &lt;br /&gt;&lt;br /&gt;pack.setfilter('udp')&lt;br /&gt;&lt;br /&gt;key=''&lt;br /&gt;&lt;br /&gt;for recv_time,recv_data in pack: &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;recv_len=len(recv_data)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;if recv_len == 102 and recv_data[42]== chr(02) and r&lt;img src =&quot;aggbug/2615374.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sun, 06 Jul 2008 05:09:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/07/05/2615374.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/07/05/2615374.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/07/05/2615374.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698840/1297359</fs:itemid></item><item><title>vc下ado存取access</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698841/1297359/1/item.html</link><wfw:comment>comments/2612075.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2612075.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2612075</trackback:ping><description>&lt;p&gt;VC++下使用ADO编写数据库程序&lt;br /&gt;&lt;br /&gt;准备：&lt;br /&gt;(1)、引入ADO类 &lt;/p&gt;&lt;pre&gt;#import &quot;c:\program files\common files\system\ado\msado15.dll&quot; \no_namespace \rename (&quot;EOF&quot;, &quot;adoEOF&quot;)	&lt;/pre&gt;(2)、初始化COM&lt;br /&gt;&lt;br /&gt;在MFC中可以用AfxOleInit();非MFC环境中用: &lt;pre&gt;CoInitialize(NULL);CoUnInitialize();&lt;/pre&gt;(3)#import 包含后就可以用3个智能指针了:_ConnectionPtr、_RecordsetPtr和_CommandPtr&lt;br /&gt;&lt;br /&gt;1.连接和关闭数据库 (1)连接 &lt;br /&gt;&lt;br /&gt;例子:连接Access数据库&lt;br /&gt;&lt;pre&gt;m_pConnection.CreateInstance(__uuidof(Connection));try                 {		// 打开本地Access库Demo.mdb	m&lt;img src =&quot;aggbug/2612075.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sat, 05 Jul 2008 00:49:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/07/04/2612075.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/07/04/2612075.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/07/04/2612075.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698841/1297359</fs:itemid></item><item><title>根据字符串类名动态创建对象</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698842/1297359/1/item.html</link><wfw:comment>comments/2609408.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2609408.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2609408</trackback:ping><description>根据字符串类名动态创建对象&lt;img src =&quot;aggbug/2609408.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Fri, 04 Jul 2008 03:49:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/07/03/2609408.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/07/03/2609408.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/07/03/2609408.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698842/1297359</fs:itemid></item><item><title>rtti实现c++反射</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698843/1297359/1/item.html</link><wfw:comment>comments/2557487.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2557487.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2557487</trackback:ping><description>&lt;strong&gt;&lt;font color=&quot;#800080&quot;&gt;标准C++ RTTI的仿MFC实现 - 只用2个宏来实现&quot;根据对象名创建对象&quot;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font color=#ffa500 size=2&gt;作者: Jerry Cat&lt;br /&gt;时间: 2006/05/30&lt;br /&gt;链接:&amp;nbsp;&lt;a href=&quot;http://www.cppblog.com/jerysun0818/archive/2006/05/30/7895.html&quot;&gt;&lt;font color=&quot;#ffa500&quot;&gt;http://www.cppblog.com/jerysun0818/archive/2006/05/30/7895.html&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;1. 起由:&lt;/font&gt; &lt;p&gt;&lt;font size=&quot;2&quot;&gt;C++ RTTI缺乏一些运行时信息即便是C++98这方面也不好使，无法根据对象名直接创建对象. 所以MFC为了实现序列化，从头构造了自己的RTTI信息，并定义了一整套宏. 具体可以参考&lt;img src =&quot;aggbug/2557487.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 18 Jun 2008 00:04:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557487.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557487.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557487.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698843/1297359</fs:itemid></item><item><title>如何导入导出大数据量(1000万条)的表？</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698844/1297359/1/item.html</link><wfw:comment>comments/2557333.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2557333.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2557333</trackback:ping><description>&lt;p&gt;&lt;font style=&quot;font-size: 16px&quot;&gt;&lt;strong&gt;问题:如何导入导出大数据量(1000万条)的表(如t_employee)？&lt;br /&gt;步骤：&lt;br /&gt;1、从数据库1中导出数据&lt;br /&gt;2、使用delete删除数据2中相同表的所有数据。&lt;br /&gt;3、导入。&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font style=&quot;font-size: 16px&quot;&gt;&lt;strong&gt;思考：以上步骤对吗？&lt;br /&gt;分析：错误有2。&lt;br /&gt;1、不应该使用delete删除大量数据。&lt;br /&gt;2、在数据导入时，数据库系统将会同时维护索引。所以效率会很低。&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font style=&quot;font-size: 16px&quot;&gt;&lt;strong&gt;正确的做法是：&lt;br /&gt;1、从数据库1中导出&lt;br /&gt;2、删除数据库2中对应表中的所有索引对象&lt;br /&gt;3、使用truncate命令清除该表的所有数据&lt;br /&gt;4、导入(此时数据库不会再维护索引，效率最高)&lt;br /&gt;5、重建相关索引(使用脚本)&lt;/strong&gt;&lt;/font&gt;&lt;&lt;img src =&quot;aggbug/2557333.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Tue, 17 Jun 2008 23:36:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557333.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557333.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/06/17/2557333.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698844/1297359</fs:itemid></item><item><title>VC8应用程序的发布问题</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698845/1297359/1/item.html</link><wfw:comment>comments/2533396.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2533396.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2533396</trackback:ping><description>&lt;p&gt;&lt;strong&gt;1. 问题描述：&lt;/strong&gt;&lt;br /&gt;最近在VS2005下用C++写了一个Console程序，在一台未安装VS2005的机器上不能正常运行。&lt;br /&gt;用命令行方式运行，提示：&lt;br /&gt;“系统无法执行指定的程序”&lt;br /&gt;直接双击运行，提示：&lt;br /&gt;“由于应用程序的配置不正确，应用程序未能启动，重新安装应用程序可能会纠正这个问题”&lt;br /&gt;用VC6和VS2003也有这个问题，只不过会提示说找不到“***.dll”，把需要的dll拷贝到目标机器就可以正常运行了。而VS2005并没有提示缺少哪些dll。&lt;br /&gt;&lt;strong&gt;2. 解决方案：&lt;/strong&gt;&lt;br /&gt;在水木C++版请教了一下，ass做出了回答（非常感谢ass的帮助）。把他的回答摘录如下，大家共同学习：&lt;br /&gt;“因为没有msvcr80.dll&lt;br /&gt;可以改一下编译选项 多线程dll(/MD)改成多线程(MT)这样就静态链接，&lt;br /&gt;也可以从你的vc8安装盘上找到再分发包vcredist_xxx.exe和你的程序捆绑安装。”&lt;/p&gt;&lt;p&gt;也可到这里下载：&lt;/p&gt;&lt;p&gt;&lt;img src =&quot;aggbug/2533396.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 11 Jun 2008 04:47:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533396.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533396.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533396.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698845/1297359</fs:itemid></item><item><title>VS2005静态链接</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698846/1297359/1/item.html</link><wfw:comment>comments/2533106.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2533106.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2533106</trackback:ping><description>&lt;p&gt;General:&lt;/p&gt;&lt;p&gt;工程 -&amp;gt; 属性 -&amp;gt; 配置属性 -&amp;gt; C/C++ -&amp;gt; 代码生成&lt;br /&gt;运行时库选项: /MT or /MTd&lt;/p&gt;&lt;p&gt;For MFC:&lt;/p&gt;&lt;p&gt;工程 -&amp;gt; 属性 -&amp;gt; 配置属性 -&amp;gt; 常规&lt;br /&gt;MFC的使用: 在静态库中使用mfc&lt;/p&gt;&lt;p&gt;All:&lt;/p&gt;&lt;p&gt;工程 -&amp;gt; 属性 -&amp;gt; 配置属性 -&amp;gt; 链接器 -&amp;gt; 输入&lt;/p&gt;&lt;p&gt;忽略特定库: msvcrt.lib;msvcprt.lib&lt;/p&gt;&lt;img src =&quot;aggbug/2533106.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 11 Jun 2008 03:19:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533106.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533106.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/06/10/2533106.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698846/1297359</fs:itemid></item><item><title>c 与 c＋＋中的time相关函数</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698847/1297359/1/item.html</link><wfw:comment>comments/2515457.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2515457.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2515457</trackback:ping><description>&lt;p&gt;本文从介绍基础概念入手，探讨了在C/C++中对日期和时间操作所用到的数据结构和函数，并对计时、时间的获取、时间的计算和显示格式等方面进行了阐述。本文还通过大量的实例向你展示了time.h头文件中声明的各种函数和数据结构的详细使用方法。 &lt;/p&gt;&lt;p&gt;关键字：UTC（世界标准时间），Calendar Time（日历时间），epoch（时间点），clock tick（时钟计时单元） &lt;/p&gt;&lt;p&gt;1．概念 &lt;br /&gt;在C/C++中，对字符串的操作有很多值得注意的问题，同样，C/C++对时间的操作也有许多值得大家注意的地方。最近，在技术群中有很多网友也多次问到 过C++语言中对时间的操作、获取和显示等等的问题。下面，在这篇文章中，笔者将主要介绍在C/C++中时间和日期的使用方法. &lt;/p&gt;&lt;p&gt;通过学习许多C/C++库，你可以有很多操作、使用时间的方法。但在这之前你需要了解一些“时间”和“日期”的概念，主要有以下几个： &lt;/p&gt;&lt;p&gt;Coordinated Universal Time（UTC）：协调世界时，又称为世界标准时间，也就是大家所熟知的格林威治标准时间（Greenwich &lt;img src =&quot;aggbug/2515457.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Fri, 06 Jun 2008 08:42:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/06/06/2515457.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/06/06/2515457.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/06/06/2515457.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698847/1297359</fs:itemid></item><item><title>c/c++基本文件读写</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698848/1297359/1/item.html</link><wfw:comment>comments/2488137.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2488137.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2488137</trackback:ping><description>在编程的过程中，文件的操作是一个经常用到的问题，在C++Builder中，可以使用多种方法对文件操作，下面我就按以下几个部分对此作详细介绍，就是：&lt;p&gt;　　1、基于C的文件操作;&lt;/p&gt;&lt;p&gt;　　2、基于C++的文件操作;&lt;/p&gt;&lt;p&gt;　　&lt;strong&gt;1. 基于C的文件操作&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;　　在ANSI C中，对文件的操作分为两种方式，即流式文件操作和I/O文件操作，下面就分别介绍之。&lt;/p&gt;&lt;p&gt;　　1）流式文件操作&lt;/p&gt;&lt;p&gt;　　这种方式的文件操作有一个重要的结构FILE，FILE在stdio.h中定义如下：&lt;/p&gt;&lt;p&gt;　　&lt;/p&gt;&lt;p&gt;&lt;table style=&quot;border-right: #cccccc 1px dotted; table-layout: fixed; border-top: #cccccc 1px dotted; border-left: #cccccc 1px dotted; border-bottom: #cccccc 1px dotted&quot; cellspacing=0 cellpadding=6 width=&quot;95%&quot; align&lt;img src =&quot;aggbug/2488137.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 28 May 2008 04:47:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/05/27/2488137.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/05/27/2488137.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/05/27/2488137.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698848/1297359</fs:itemid></item><item><title>一道经典的面试题：如何从N个数中选出最大（小）的n个数？</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698849/1297359/1/item.html</link><wfw:comment>comments/2475400.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>comments/commentRss/2475400.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2475400</trackback:ping><description>&lt;p&gt;一道经典的面试题：如何从N个数中选出最大（小）的n个数？&lt;/p&gt;&lt;p&gt;北京交大LuoBin&lt;/p&gt;&lt;p&gt;这个问题我前前后后考虑了有快一年了，也和不少人讨论过。据我得到的消息，Google和微软都面过这道题。这道题可能很多人都听说过，或者知道答案（所谓的“堆”），不过我想把我的答案写出来。我的分析也许存有漏洞，以交流为目的。但这是一个满复杂的问题，蛮有趣的。看完本文，也许会启发你一些没有想过的解决方案（我一直认为堆也许不是最高效的算法）。在本文中，将会一直以寻找n个最“大”的数为分析例子，以便统一。注：本文写得会比较细节一些，以便于绝大多数人都能看懂，别嫌我罗嗦:) 我很不确定多少人有耐心看完本文！&lt;/p&gt;&lt;p&gt;Naive 方法：&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 首先，我们假设n和N都是内存可容纳的，也就是说N个数可以一次load到内存里存放在数组里（如果非要存在链表估计又是另一个challenging的问题了）。从最简单的情况开始，如果n=1，那么没有任何疑惑，必须要进行N-1次的比较才能得到最大的那个数，直接遍历N个数就可以了。如果n=2呢？当然，&lt;img src =&quot;aggbug/2475400.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sat, 24 May 2008 07:12:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475400.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475400.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475400.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698849/1297359</fs:itemid></item><item><title>变态比赛规则</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698850/1297359/1/item.html</link><wfw:comment>comments/2475329.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2475329.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2475329</trackback:ping><description>变态比赛规则&lt;br /&gt;为了促进各部门员工的交流，百度举办了一场全公司范围内的“拳皇”（百度内部最流行的格斗游戏）友谊赛，负责组织这场比赛的是百度的超级“拳皇”迷W.Z。W.Z不想用传统的淘汰赛或者循环赛的方式，而是自己制定了一个比赛规则。&lt;br /&gt;由于一些员工（比如同部门或者相邻部门员工）平时接触的机会比较多，为了促进不同部门之间的交流，W.Z希望员工自由分组。不同组之间的每两个人都会进行一场友谊赛而同一组内的人之间不会打任何比赛。&lt;p&gt;比如4个人，编号为1~4,如果分为两个组并且1，2一个组，3，4一个组，那么一共需要打四场比赛：1 vs 3，1 vs 4，2 vs 3，2 vs 4。 而如果是1，2，3一组，4单独一组，那么一共需要打三场比赛: 1 vs 4，2 vs 4，3 vs 4。&lt;/p&gt;&lt;p&gt;很快 W.Z意识到，这样的比赛规则可能会让比赛的场数非常多。W.Z想知道如果有N个人，通过上面这种比赛规则，总比赛场数有可能为K场吗？比如3个人，如果只分到一组则不需要比赛，如果分到两组则需要2场比赛，如果分为三组则需要3场比赛。但是无论怎么分都不可能恰需要1场比赛。&lt;/p&gt;&lt;p&gt;&lt;img src =&quot;aggbug/2475329.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sat, 24 May 2008 06:52:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475329.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475329.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475329.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698850/1297359</fs:itemid></item><item><title>求丑陋数</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698851/1297359/1/item.html</link><wfw:comment>comments/2475288.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2475288.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2475288</trackback:ping><description>&lt;p&gt;做过一道求丑陋数的面试题，下面是一篇关于丑陋数的文章，写得不错：&lt;/p&gt;&lt;blockquote dir=ltr style=&quot;margin-right: 0px&quot;&gt;&lt;p&gt;&lt;a href=&quot;http://www.programfan.com/blog/article.asp?id=25030&quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;http://www.programfan.com/blog/article.asp?id=25030&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;本文对文中的三种方法进行整理，并描述我当时的解法。&lt;/p&gt;&lt;p&gt;以下两种方法逐个遍历整数，筛选出丑陋数，效率太低：&lt;/p&gt;&lt;p&gt;1、逐个遍历，直接测试是否为丑陋数，判断依据是丑陋数去除2、3、5因子后结果为1&amp;nbsp;&lt;/p&gt;&lt;div style=&quot;border-right: windowtext 0.5pt solid; padding-right: 5.4pt; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; bac&lt;img src =&quot;aggbug/2475288.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sat, 24 May 2008 06:43:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475288.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475288.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475288.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698851/1297359</fs:itemid></item><item><title>趣味题系列（7）：蚂蚁</title><link>http://item.feedsky.com/~csdn.net/yysdsyl/~1294487/91698852/1297359/1/item.html</link><wfw:comment>comments/2475237.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2475237.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2475237</trackback:ping><description>&lt;p&gt;题目：有一根1米长的木棒漂流在海上，突然从天空中降下100只蚂蚁，幸运的是它们都降在了在这根木棒上，（它们降落在木棒上的位置是随机的）。然而不幸的事发生了，&amp;shy;所有蚂蚁从降落的时刻起就随机朝着木棒的一个方向以1cm/s的速度行走，而当发生两只蚂蚁相碰的时候，它们就各自立即进行反方向行走。一旦有蚂蚁走到了木棒的&amp;shy;如何一段，这只蚂蚁就会落入大海。现在，问最少经历多少时间就可以保证所有的蚂蚁都在海里游泳了？&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;解答：&lt;/p&gt;&lt;p&gt;100s&lt;/p&gt;&lt;p&gt;碰撞穿越&lt;/p&gt;&lt;img src =&quot;aggbug/2475237.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Sat, 24 May 2008 06:26:00 +0800</pubDate><author>yysdsyl</author><comments>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475237.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475237.aspx</guid><dc:creator>yysdsyl</dc:creator><fs:srclink>http://blog.csdn.net/yysdsyl/archive/2008/05/23/2475237.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/yysdsyl/rss.aspx</fs:srcfeed><fs:itemid>csdn.net/yysdsyl/~1294487/91698852/1297359</fs:itemid></item></channel></rss>