d*******n 发帖数: 524 | 1 把要include的基本头文件,和我自己写的头文件写在一个stdafx.h里面,该文件内容
如下: |
B*******g 发帖数: 1593 | 2 Try...open document "stdafx.h" from your cpp, see if it is the same
stdafx.h file?
【在 d*******n 的大作中提到】 : 把要include的基本头文件,和我自己写的头文件写在一个stdafx.h里面,该文件内容 : 如下:
|
d*******n 发帖数: 524 | 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to do that? Thanks!
【在 B*******g 的大作中提到】 : Try...open document "stdafx.h" from your cpp, see if it is the same : stdafx.h file?
|
B*******g 发帖数: 1593 | 4 errr...就在#include "stdafx.h" 右键点 open document... (如果你用的是VS)
我只是怀疑include的是另外的 stdafx.h 文件
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to do that? Thanks!
【在 B*******g 的大作中提到】 : Try...open document "stdafx.h" from your cpp, see if it is the same : stdafx.h file?
|
d*******n 发帖数: 524 | 5 就是这个stdafx.h,不是另外的。
【在 B*******g 的大作中提到】 : errr...就在#include "stdafx.h" 右键点 open document... (如果你用的是VS) : 我只是怀疑include的是另外的 stdafx.h 文件 : : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to do that? Thanks!
|
H***a 发帖数: 735 | 6 I think your idea should work. Have you tried the "standard" include guard,
i.e.
#ifndef INCLUDED_XX_H
#define INCLUDED_XX_H
...
#endif
I heard definition of "pragma" is machine- or os- or compiler- dependent so
not portable. |