| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 703 人关注过本帖
标题:C++ headers in one file
只看楼主 加入收藏
HJin
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:401
专家分:0
注 册:2007-6-9
收藏
 问题点数:0 回复次数:8 
C++ headers in one file

Once in a while, you will find you did not include a header. Here is a simple solution:

writing all of them in one file and include the file:

cpp.h


#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

using namespace std;



in main, you do

#include \"cpp.h\"

int main()
{


return 0;
}



[此贴子已经被作者于2007-10-18 12:31:42编辑过]

搜索更多相关主题的帖子: headers file one 
2007-10-18 12:30
雨中飛燕
Rank: 1
等 级:新手上路
帖 子:765
专家分:0
注 册:2007-10-13
收藏
得分:0 
-,-



by 雨中飞燕
Blog: http://yzfy.programfan.com

[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url] [url=http://blog.programfan.com/article.asp?id=24801]请不要写出非int声明的main函数[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
2007-10-18 12:42
kisscjy
Rank: 1
等 级:新手上路
帖 子:217
专家分:0
注 册:2007-4-9
收藏
得分:0 

每当我一晚写下70,80个程序时,你还真以为,这都是我一个人干的.....不过说真的,其实都是抄书的~~ ^@^
2007-10-18 12:43
远去的列车
Rank: 1
等 级:新手上路
威 望:2
帖 子:205
专家分:0
注 册:2007-8-7
收藏
得分:0 
good, 在cpp.h里注释一下包含哪些常用到的函数就更棒了

C++学习
2007-10-18 13:38
cince
Rank: 1
等 级:新手上路
威 望:1
帖 子:108
专家分:0
注 册:2007-1-21
收藏
得分:0 
雨中飛燕

我正式BS你的签名图片..

搞什么..版面都郁闷了..

每次都弄一下..累不?

There Is Nothing Impossible In My Dictionary.
2007-10-18 16:35
cince
Rank: 1
等 级:新手上路
威 望:1
帖 子:108
专家分:0
注 册:2007-1-21
收藏
得分:0 
雨中飛燕

我正式BS你的签名图片..

搞什么..版面都郁闷了..

每次都弄一下..累不?

There Is Nothing Impossible In My Dictionary.
2007-10-18 16:36
xskowscut
Rank: 1
等 级:新手上路
帖 子:81
专家分:0
注 册:2007-10-13
收藏
得分:0 
不错的方法

希望能够跟大家学习!交流编程经验!
2007-10-19 13:07
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 

好办法


从BFS(Breadth First Study)到DFS(Depth First Study)
2007-10-19 13:19
cwande
Rank: 2
等 级:新手上路
威 望:3
帖 子:333
专家分:0
注 册:2006-8-18
收藏
得分:0 
ym

汗,都懒得写代码了.......... cheat了一个威望,哈.....
2007-10-19 19:34
快速回复:C++ headers in one file
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016293 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved