Hi, I am using Visual studio 2008 express edition now. It does not have stdafx.h. so I download stdafx.h and three other head files: AFXWIN.h, AFXEXT.h and AFXCMN.h from google. I put these four headfiles into C:\Program Files\Microsoft Visual Studio 9.0\VC\include. And then I wrote a small program just to test if it is working.
-------------------------------------------------code start
#include <iostream>
#include <stdafx.h>
using namespace std;
int main()
{
cout << "GHHH"<< endl;
}
---------------------------------------------------code ends
I got these compile information:
-------------------------------------------------compile message
1>------ Build started: Project: Hello, Configuration: Debug Win32 ------
1>Compiling...
1>Hello.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\afxwin.h(19) : fatal error C1083: Cannot open include file: 'afx.h': No such file or directory
1>Build log was saved at "file://c:\Users\leo\Documents\Visual Studio 2008\Projects\Hello\Hello\Debug\BuildLog.htm"
1>Hello - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
---------------------------------------------------compile msg ends
Could anyone tell me why and how to solve the problem. Thanks a lot!