设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> Visual C++ >> GNU的C++代码书写规范,C语言之父Dennis Ritchie亲自修订
精品推荐
Visual C++点击TOP10
·用WINSOCK实现聊天室的VC++程序设计
·利用mfc编写activex控件
·用vc实现生产者消费者问题
·DirectX8.0
·C/C++ 大量经典编程书籍下载
·VC快捷键大全
·CreateFileMapping的MSDN翻译和使用心得
·Windows环境下的麦克风录音系统
·挂钩Windows API
·如何开发OPC Server
编程开发点击TOP10
·数字小键盘指法练习
·用C语言编通讯录程序(初学者级别的)
·ASP.NET 程序中常用的三十三种代码
·我写的Java学生成绩管理系统源代码
·CHK文件恢复工具
·java笔试题
·Modem 常用AT指令集
·异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
精选专题

GNU的C++代码书写规范,C语言之父Dennis Ritchie亲自修订

作者: 来源:网络文章 时间:2005-12-13 18:13:12

GNU的C++代码书写规范,C语言之父Dennis Ritchie亲自修订(1) C++ Standard Library Style Guidelines  DRAFT 1999-02-26
-------------------------------------

This library is written to appropriate C++ coding standards.  As sUCh,
it is intended to precede the recommendations of the GNU Coding
Standard, which can be referenced here:

http://www.gnu.ai.mit.edu/prep/standards_toc.html

ChangeLog entries for member functions should use the
classname::member function name syntax as follows:

1999-04-15  Dennis Ritchie  <dr@att.com>

* src/basic_file.cc (__basic_file::open): Fix thinko in
_G_HAVE_IO_FILE_OPEN bits.

Notable areas of divergence from what may be previous local practice
(particularly for GNU C) include:

01. Pointers and references
  char* p = "flop";
  char& c = *p;
     -NOT-
  char *p = "flop";  // wrong
  char &c = *p;      // wrong
 
    Reason: In C++, definitions are mixed with executable code.  Here,      
    p          is being initialized, not *p.  This is near-universal
            practice among C++ programmers; it is normal for C hackers
            to switch spontaneously as they gain eXPerience.

02. Operator names and parentheses
  operator==(type)
     -NOT-
  operator == (type)  // wrong
    
    Reason: The == is part of the function name.  Separating

共6页 9 7 [1] [2] [3] [4] [5] [68 :>

GNU的C++代码书写规范,C语言之父Dennis Ritchie亲自修订 相关文章:
GNU的C++代码书写规范,C语言之父Dennis Ritchie亲自修订 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com