C语言1000以内水仙花,C语言求助:求1000以内的水仙花数&n – 手机爱问

7cd4706f7ad7a91938cd1aa08ffabe9e.png

2006-05-14

#include和#include有什么区别阿?怎么用?:)

原文为什么#include 过时了在早些年C++是没有标准的,所有的编译器厂商仅仅是遵循“这里应该有些什么”这样一个粗糙的约定。并且你经常由于一些烦人的小小的不同,而无法很容易的把一个程序从一个编译器/平台移植到另一个。 因此C++的爵士们坐到了圆桌前,经过激励的讨论制定出一个叫做ISO-C++的标准。这个标准也被称为标准C++,C++98 或者更正式ISO/IEC 14882:1998 。在这个标准中很多旧的头文件都被标准化了,这样就可以使用一部固定的手册而不用担心你在使用哪一个编译器了。 为了和旧的头文件有所不同,新的头文件去掉了。h后缀。因此#include 现在成了#in...全部

原文 为什么#include 过时了在早些年C++是没有标准的,所有的编译器厂商仅仅是遵循“这里应该有些什么”这样一个粗糙的约定。并且你经常由于一些烦人的小小的不同,而无法很容易的把一个程序从一个编译器/平台移植到另一个。

因此C++的爵士们坐到了圆桌前,经过激励的讨论制定出一个叫做ISO-C++的标准。这个标准也被称为标准C++,C++98 或者更正式ISO/IEC 14882:1998 。在这个标准中很多旧的头文件都被标准化了,这样就可以使用一部固定的手册而不用担心你在使用哪一个编译器了。

为了和旧的头文件有所不同,新的头文件去掉了。h后缀。因此#include 现在成了#include 很多其他的头文件也是如此。并且新的头文件包含在标准名空间(standard namespace)中。

在新的头文件中的任何对象,如cout 和 endl 都能在名空间std中找到,也可以被独立的访问。#include void f() { std::cout using std::cout; void f() { cout using namespace std; void f() { cout Many useful algorithms, like std::copy Bitset Complex numbers Deque containters Exception handling File IO Function objects IO manipulators IO base classes IO forward declarations IO streams Input streams Useful iterators, like std::ostream_iterator Implementation properties List containers I18 Locales Assiociative containers Memory managment Dynamic memory management Numeric limits Output streams Queue containers Set containers String streams Stack containers Exception classes Stream buffer classes String classes Type identification Utility component Arrays of values Vector containers adapted assert。

h from C adapted ctype。h from C adapted errno。h from C adapted float。h from C adapted limits。

h from C adapted locale。h from C adapted math。h from C adapted setjump。h from C adapted signal。

h from C adapted stdarg。h from C adatped stddef。h from C adapted stdio。h from C adapted stdlib。

h from C adapted string。h from C adapted time。h from C adapted wchar。h from C adapted wctype。

h from C 网上更多的文档链接: Quite nice, covers the most commoned used things Covers only few of the headers。

Lots of information MS's docu to the VC++ standard libraries A lot of info, but remember: SGI STL is only similar to the C++ standard library, it's not the same Docs for the Dinkumware implementation of the C++ library PS:头文件的作用没用翻译,一是感觉没有必要;二是也怕自己水平有限,翻译的不准确,贻笑大方了。

Trackback: 个人翻译的,写在我blog里了。有空可以去坐坐 。收起

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值