|

楼主 |
发表于 2003-11-17 13:53:00
|
显示全部楼层
谢谢大家的帮助,问题已经解决了。
其实还是预编译的问题。因为我把"StdAfx.h"改成了"head.h",因而它没有进行预编译。所以:
1.我先建了一个文件"StdAfx.h",
//"StdAfx.h"
#pragma once
#include "head.h"
2.建"StdAfx.cpp"
//StdAfx.cpp
#inlcude "StdAfx.h"
3.选择工程----->settings,左边选住工程,右边在C/C++中Category选中precompliyed heads.在下面选择 use precompliyed head填入"stdAFx.h".
4..选择工程----->settings,左边选住文件"stdAfx.cpp",右面在C/C++中Category选中precompliyed heads,在下面选择Create precompliyed heads,填上"stdAfx.h".
5.所有的cpp文件最开头都用#include "stdAfx.h"
就可以了.根据http://cppworld.myrice.com/document/20030727-12.htm |
|