在学习了多年的 C 语言之后,我在哪里可以找到学习 C 语言的快速参考资料?
我最后一次专业使用 C 语言是在 1997 年 IIRC 左右。从那时起我就使用了大量的 C++。现在,我发现我需要再次使用一些C。
我确信的一件事是,我不能仅仅放弃明显的 C++ 功能(例如类)并期望一切都能正常工作。还有各种不太明显的语法变化。我只是不记得它们是什么。
是否有一个很好的参考来再次进行这种转换,但返回到 C?如果它能解释 C99(以及更高版本?)中的变化那就更好了。
I last used C professionally around 1997 IIRC. I've used a lot of C++ since then. Now, I find I need to use some C again.
One thing I'm sure of is that I can't just drop the obvious C++ features (e.g. classes) and expect everything to work. There are various less obvious syntax changes. I just don't remember what they are.
Is there a good reference for making that transition again, but returning to C? If it explains the changes in C99 (and later?) that's even better.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
正如 Dirkgently 所建议的那样,哈比森和斯蒂尔是一个很好的参考,但我认为温习它没有什么用处。为了重新训练你的思维,我有以下建议:
重读 Kernighan 和 Ritchie
可选:阅读 Peter van der Linden 的精彩著作 专家 C 编程:深层 C 秘密。
不要忘记图书馆!看看 PJ Plauger 的书标准 C 库,或者直接访问 http://dinkumware.com/ (Plauger 的公司)并浏览他们关于 C99 库的优秀文档。
标准 C 缺乏数据结构库。幸运的是,有一个优秀的免费第 3 方库可以填补多个空白:Dave Hanson 的 C Interfaces 和实现。
As dirkgently suggests, Harbison and Steele is a good reference, but I don't find it useful to brush up on. To retrain your mind, I have these suggestions:
Reread Kernighan and Ritchie
Optional: read Peter van der Linden's superb Expert C Programming: Deep C Secrets.
Don't forget libraries! Look at P. J. Plauger's book The Standard C Library, or just go to http://dinkumware.com/ (Plauger's company) and browse their excellent documentation of the C99 libraries.
Standard C lacks data-structure libraries. Fortunately there is an excellent, free 3rd-party library that fills several voids: Dave Hanson's C Interfaces and Implementations.
Herbison 和 Steele:C:参考手册,第五版 可能对 C99 有帮助。另外,请阅读 open-std.org 上提供的标准论文。最后,您计划使用的编译器/工具链文档。后者将一切都放在正确的位置上——关于你需要重新学习多少。
Herbison and Steele: C: A Reference Manual, Fifth Edition may be of help w.r.t C99. Also, read up on the standard, the papers available at open-std.org. And finally, the compiler/tool-chain documentation you are plan to use. The latter puts everything in perspective -- as to how much you need to re-learn.
还不够,但是一个很好的入门:C for C++ 程序员
Not enough but a good starter : C for C++ Programmers
不是书,而是读 GTK+ 源代码。它可能很丑陋,但它有一些我读过的最好的 C 源代码。
Not a book but read GTK+ source code. It may be fugly but it's got some of the best C source code I've ever read.
C for Programmers,作者 Leendert Ammeraal,是迄今为止我拥有的最好的东西沿着这些思路可以看到。不幸的是,它已有近 20 年的历史,很难找到,而且(显然)不是 C99 的最新版本。
C for Programmers, by Leendert Ammeraal, is by far the best thing I have seen along these lines. Unfortunately, it is almost 20 years old, hard to find, and (obviously) not up to date on C99.
尝试以下链接,我发现它非常适合参考:
Sarafi Books 或 Books24x7(您可以使用 ACM 或 IEEE 会员身份访问这两个链接)也是技术书籍的绝佳参考。
另外,没有什么可以打败 K&R:
我认为上述内容应该为您提供足够的阅读材料来持续几周,您将成为一名出色的 C 程序员。一切顺利。 :-)
Try the following link, I have found it good for reference:
Also Sarafi Books or Books24x7, (you have access to both using either ACM or IEEE membership), are excellent references for technical books.
Also, nothing can beat the K&R:
I think the above should give you enough reading material to last for a few weeks and you will emerge as an accomplished C programmer. All the Best. :-)