C 语言中的 *.r 文件是什么?
可能的重复:
什么是c中的“私有标头”
我指的是这个问题:
该问题的接受答案发布了一个链接书: http://www.cs.rit.edu/~ats/ books/ooc.pdf
在本书中,除了*.c 和*.h 文件之外,作者还使用*.r 文件。 *.r 文件使用类似标头的方式,向用户隐藏“C 类”的实现
我的问题是 *.r 文件是什么?
它们是 C 语言编码的标准吗?
或者这是阿克塞尔·施赖纳(Axel Schreiner)在写书时想到的东西?
Possible Duplicate:
what is a “private header” in c
I refer to this question:
Can you write object-oriented code in C?
The accepted answer to that question posted a link to a book: http://www.cs.rit.edu/~ats/books/ooc.pdf
In this book, the author uses *.r files, in addition to *.c and *.h files. The *.r files are used like-headers, hiding the implementation of "C-classes" from users
My question is what are *.r files?
are they something standard for coding in C?
Or is it something that Axel Schreiner came up with when writing his book?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我快速浏览了 PDF,这是您所指内容的示例:
.r
指的是所谓的类的表示(因此是.r
),其中头文件实际上定义了更友好的外观方法名称:最后,c 源文件包含实际的函数代码:
长话短说,是的,
.r
是 Axel Schreiner 在他的书中提出的,正如.r
是“表示”。I had a quick look at the PDF, and here is an example of what you're referring to:
.r
is referring to the representation (hence the.r
) of the so-called class, where the header file actually defines the more friendly looking method names:And finally the c source file contains the actual function code:
Long story short, yes the
.r
was something that Axel Schreiner came up with in his book, and as mentioned the r in.r
is "representation".他将它们称为 *r* 表示文件,因此称为
.r
扩展名。它也可能是.p
或.q
。这只是作者使用的个人约定。He calls them *r*epresentation files and hence the
.r
extension. It could might as well be.p
or.q
. Its just a personal convention used by the author.