寻找 C/C++语言和标准库规范
可能的重复:
在哪里可以找到当前的 C 或 C++ 标准文件?
我有几本 C 书籍,其中一本 Discovery 的 C 语言很好地解释了该语言。但到目前为止,我似乎还无法找到完整的 C/C++ 语言和库标准以及函数、类型等的详细列表。
C99 的完整标准以及较旧的、据说更常用和接受的 C 语言标准、C++ 语言标准及其库到底在哪里?
其中有一些是我必须付费的,还是我应该遵循维基百科和 GCC 等文档引用的内容?
我还应该去哪里下载或完整获取它们?
Possible Duplicate:
Where do I find the current C or C++ standard documents?
I have several C books, and one of them, C by Discovery, explains the language very well. But so far I don't seem to have been able to find the full C/C++ language and library standards and lists of functions, types, etc., in whole detail.
Where is exactly a full standard for C99 and also the older, supposedly more commonly used and accepted, C language standards, the C++ language standards, and their libraries?
Is there some of them I must pay for, or should I just follow what Wikipedia and documentation like that of GCC cite?
Where else should I go to download or get them fully?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
维基百科文章 C99 底部有一个链接到 C99 语言规范草案。这是一个草稿,因为最终发布的版本需要付费。但草稿基本上是准确的,所以是一个很好的参考。这是整个语言(包括库)的非常长的规范,但可能不是您想要的。要查看标准库,只需查阅手册页即可。请参阅 Wikipedia 文章 C 标准库,获取各种函数的列表和摘要。
对于 C++,同样的事情。维基百科文章 C++ 包含完整规范的各种草案的链接,特别是 2010 年最新的 C++ 草案(旧的 C++,在 C++0x 生效之前)。维基百科文章 C++0x 也有类似的链接,指向即将发布的草案 -被命名为 C++ 2011 标准。但如果您只是寻找标准库上的参考,则不能跳过 cplusplus.com 的参考部分< /a>,其中包括 C 库(C++ 模式)、IO 库和 STL(容器和其他杂项实用程序)的完整文档。这就是我用作日常图书馆参考的内容。
The Wikipedia article C99 has a link at the bottom to a draft of the C99 language specification. It is a draft because the final published version you have to pay for. But the draft is basically accurate, so it's a good reference. This is an extremely long specification of the entire language including the library, but possibly not what you are after. To just see the standard library, simply consult the man pages. Consult the Wikipedia article C standard library for a list and summary of the various functions.
For C++, the same deal. The Wikipedia article C++ has links to various drafts of the complete specification, notably the most recent draft of C++ from 2010 (the old C++, before C++0x comes into effect). The Wikipedia article C++0x has similar links to drafts of the soon-to-be-named C++ 2011 standard. But if you are just looking for a reference on the standard library, you can't go past cplusplus.com's reference section, which includes full documentation for the C library (in C++ mode), the IO library, and the STL (containers and other misc utilities). That's what I use as a day-to-day library reference.
我找到的最好的 C99 在线副本在这里:
http://busybox.net/~兰德利/c99-draft.html
The best online copy of C99 I've found is here:
http://busybox.net/~landley/c99-draft.html
如果你想要实际的标准,我认为你不能直接下载它。我相信你必须从美国国家标准协会购买一本。 GCC 文档没有提供 GCC 扩展的基本语言所需的所有详细信息。
If you want the actual standard, I don't think you can just download it. I believe you have to buy a copy from the American National Standards Institute. The GCC documents don't provide all the detail you need for the base language that GCC extended.