由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - c++,这种做法不行?
相关主题
怎样include一个函数forward declaration
弱问C++一个问题 一直不解[合集] Intel 9编译器在vc 6.0的环境里编译openmp的问题
求助:expected class name before "(" token请教有关header file的几个问题
问个两个.h文件互相include的问题Intel C++ compiler 求教
求助:怎么能support头文件#include namespace defined in another file
两个class的交叉引用问题shm_open failed
弱问c++里有没有NULL这个keyword?How to tell gcc stop compiling.
又一个初级问题: C++中多如牛毛的#define格式global variable usage question in C++
相关话题的讨论汇总
话题: do话题: include话题: 头文件话题: included话题: xx
进入Programming版参与讨论
1 (共1页)
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.
1 (共1页)
进入Programming版参与讨论
相关主题
global variable usage question in C++求助:怎么能support头文件#include
最基本的C语言编程问题请教两个class的交叉引用问题
Why should i include .cpp instead of .h弱问c++里有没有NULL这个keyword?
gcc 编译的时候要包括 header source file 吗?又一个初级问题: C++中多如牛毛的#define格式
怎样include一个函数forward declaration
弱问C++一个问题 一直不解[合集] Intel 9编译器在vc 6.0的环境里编译openmp的问题
求助:expected class name before "(" token请教有关header file的几个问题
问个两个.h文件互相include的问题Intel C++ compiler 求教
相关话题的讨论汇总
话题: do话题: include话题: 头文件话题: included话题: xx