查看“Google C++ Style”的源代码
←
Google C++ Style
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
C++ is one of the main development languages used by many of Google's open-source projects. As every C++ programmer knows, the language has many powerful features, but this power brings with it complexity, which in turn can make code more bug-prone and harder to read and maintain. The goal of this guide is to manage this complexity by describing in detail the dos and don'ts of writing C++ code . These rules exist to keep the code base manageable while still allowing coders to use C++ language features productively. ''Style'', also known as readability, is what we call the conventions that govern our C++ code. The term Style is a bit of a misnomer, since these conventions cover far more than just source file formatting. Most open-source projects developed by Google conform to the requirements in this guide. Note that this guide is not a C++ tutorial: we assume that the reader is familiar with the language. === google cpp style === [[文件:Google cpp style.png|无框]] === google h style === [[文件:Google h style.png|无框]] === using namespace std === 有很多人不建议使用 using namespace std,还举了例子说很难区分其他比如自己写的函数到底是不是 std 中的。事实上,自己写的函数,应该有不同于 std 的命名空间,而且在使用的时候,要明显写出,如:udef::min()。 See also: https://google.github.io/styleguide/cppguide.html [[分类:Develop]] [[分类:C++]]
返回
Google C++ Style
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
目录
文章分类
侧边栏
帮助
工具
链入页面
相关更改
特殊页面
页面信息