本帖最后由 VisualEleven 于 2011-10-17 09:33:09 编辑

解决方案 »

  1.   

    CFile::modeCreate不能用,你用就每次都创建了。
    CStdioFile file( _T("D:\\b.txt"),CFile::modeCreate| CFile::modeWrite | CFile::typeText);
    放到while前面吧,
      

  2.   

    CFile::modeCreate不能用,你用就每次都创建了。
    CStdioFile file( _T("D:\\b.txt"),CFile::modeCreate| CFile::modeWrite | CFile::typeText);
    放到while前面吧,
      

  3.   

    CFile::modeCreate不能用,你用就每次都创建了。
    CStdioFile file( _T("D:\\b.txt"),CFile::modeCreate| CFile::modeWrite | CFile::typeText);
    放到while前面吧,照LZ得帮助做了,还有个问题 上面的代码 服务端收到数据后 写入b.txt文件 还是只有一行哦  怎么确定收到数据的大小呢 还望大侠们耐心给予解答