我是用的VC6.0编译的代码跟文章上的一样:#include "stdafx.h"int _tmain(int argc,_TCHAR* argv[]) {
return 0;
}
但是一直提示说这个错误:fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe.小弟真的是菜鸟,希望前辈们抽空解答一下,非常感谢!

解决方案 »

  1.   

    忘记说明了,这个例子是win32 console application
    这个代码是保存为test.c
      

  2.   

    MFC中好像老有这种提示,编译一下stdafx.cpp就可以了
      

  3.   

    不行将前面的#include "stdafx.h"去掉吧。
      

  4.   

    因为你建立工程时候选择不对
    所以你的工程没有StdAfx.h这个文件解决方法2种
    1. #include "stdafx.h"去掉
    2. 添加StdAfx.h这个文件(该文件可以不要有内容) 有这个文件就可以通过编译了