你是link错误还是compil错误,没听过ofstream还需要lib文件???你把错误贴出来看看

解决方案 »

  1.   

    慢着:还有问题:
    Linking...
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
      

  2.   

    project->  settings->  c/c++
      下拉code  generation
      看Use  run-time  library里,你选了multithreaded没有?  (一般用debug  multithreaded  dll)
      

  3.   

    _beginthread            _endthread
    requires the multithreaded library
      

  4.   

    谢谢啦,我选 debug multithreaded终于通过了。:)马上给分:
      

  5.   

    使用多线程库。msvcrt.lib( 动态库的引入库) 或 libmt.lib。