腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
C++核心准则原文翻译
专栏成员
举报
465
文章
279259
阅读量
44
订阅数
订阅专栏
申请加入专栏
全部文章(465)
c++(211)
编程算法(91)
https(60)
python(53)
网络安全(53)
gui(37)
linux(32)
es(18)
ide(17)
网站(13)
打包(12)
git(11)
github(11)
html(10)
开源(10)
function(9)
http(8)
express(7)
容器(7)
class(7)
this(7)
java(6)
javascript(6)
c#(6)
jquery ui(6)
access(6)
serverless(6)
缓存(6)
小程序(6)
node.js(5)
code(5)
object(5)
对象存储(4)
腾讯云测试服务(4)
gcc(4)
uml(4)
微信(4)
迁移(4)
auto(4)
behavior(4)
default(4)
error(4)
handle(4)
local(4)
types(4)
unsigned(4)
其他(3)
单片机(3)
数据库(3)
ubuntu(3)
数据分析(3)
腾讯云开发者社区(3)
constructor(3)
copy(3)
crash(3)
data(3)
exception(3)
exit(3)
list(3)
overflow(3)
templates(3)
thread(3)
using(3)
ios(2)
xml(2)
android(2)
sql(2)
eclipse(2)
api(2)
文件存储(2)
vr 视频解决方案(2)
underscore(2)
面向对象编程(2)
socket编程(2)
arguments(2)
bit(2)
bug(2)
constants(2)
containers(2)
declaration(2)
embedded(2)
goto(2)
implementation(2)
integer(2)
io(2)
it(2)
member(2)
modulo(2)
nested(2)
point(2)
reference(2)
scope(2)
sizeof(2)
time(2)
ui(2)
variables(2)
void(2)
布局(2)
事件(2)
通信(2)
php(1)
go(1)
actionscript(1)
css(1)
jquery(1)
json(1)
硬件开发(1)
unix(1)
apache(1)
图像处理(1)
存储(1)
ssh(1)
数据结构(1)
abstract(1)
add(1)
algorithm(1)
allocation(1)
arrays(1)
block(1)
break(1)
button(1)
case(1)
center(1)
character(1)
cin(1)
combinations(1)
comments(1)
compatibility(1)
compilation(1)
composition(1)
constraints(1)
container(1)
core(1)
cout(1)
debug(1)
delegates(1)
diagram(1)
division(1)
effects(1)
evaluation(1)
file(1)
flush(1)
grammar(1)
heap(1)
image(1)
implicit(1)
indentation(1)
input(1)
int(1)
interface(1)
line(1)
literals(1)
lock(1)
matrix(1)
media(1)
memory(1)
message(1)
monitor(1)
mutex(1)
namespaces(1)
operators(1)
output(1)
overloading(1)
parentheses(1)
pointers(1)
pool(1)
private(1)
project(1)
protected(1)
range(1)
require(1)
reset(1)
rules(1)
sharing(1)
size(1)
slice(1)
src(1)
surface(1)
table(1)
typedef(1)
undefined(1)
unique(1)
view(1)
zero(1)
地图(1)
定时器(1)
接口(1)
异步(1)
语法(1)
指针(1)
搜索文章
搜索
搜索
关闭
自学鸿蒙应用开发(25)- 基本的CommonDialog
https
网络安全
c++
jquery ui
网站
对话框是应用程序的主要输入手段之一,但是遗憾的是目前鸿蒙的开发网站上只有ToastDialog用法,其他类型的对话框则只能参考为数不多的英文文档。
面向对象思考
2021-02-25
707
0
C++核心准则讨论:持有没有被句柄管理的资源时切勿抛出异常
node.js
c++
Discussion: Never throw while holding a resource not owned by a handle
面向对象思考
2020-12-31
668
0
C++核心准则讨论:析构,释放和交换操作必须永不失败
c++
linux
Never allow an error to be reported from a destructor, a resource deallocation function (e.g., operator delete), or a swap function using throw. It is nearly impossible to write useful code if these operations can fail, and even if something does go wrong it nearly never makes any sense to retry. Specifically, types whose destructors might throw an exception are flatly forbidden from use with the C++ Standard Library. Most destructors are now implicitly noexcept by default.
面向对象思考
2020-12-15
649
0
C++核心准则NL.19:避免容易被误读的名称
c++
Readability. Not everyone has screens and printers that make it easy to distinguish all characters. We easily confuse similarly spelled and slightly misspelled words.
面向对象思考
2020-12-15
454
0
C++核心准则NL.18:使用C ++风格的声明符布局
c++
The C-style layout emphasizes use in expressions and grammar, whereas the C++-style emphasizes types. The use in expressions argument doesn't hold for references.
面向对象思考
2020-12-15
419
0
C++核心准则NL.17:使用K&R风格派生的布局
c++
ide
This is the original C and C++ layout. It preserves vertical space well. It distinguishes different language constructs (such as functions and classes) well.
面向对象思考
2020-12-15
676
0
C++核心准则NL.10:首选下划线风格名称
underscore
javascript
c++
linux
The use of underscores to separate parts of a name is the original C and C++ style and used in the C++ Standard Library.
面向对象思考
2020-11-26
425
0
C++核心准则GSL:指南支持库
c++
https
actionscript
网络安全
The GSL is a small library of facilities designed to support this set of guidelines. Without these facilities, the guidelines would have to be far more restrictive on language details.
面向对象思考
2020-11-17
979
0
C++核心准则Pro.lifetime:生命周期安全群组
c++
github
https
git
开源
Accessing through a pointer that doesn't point to anything is a major source of errors, and very hard to avoid in many traditional C or C++ styles of programming. For example, a pointer might be uninitialized, the nullptr, point beyond the range of an array, or to a deleted object.
面向对象思考
2020-11-11
435
0
C++核心准则Pro.safety:类型安全准则群组
c++
linux
This profile makes it easier to construct code that uses types correctly and avoids inadvertent type punning. It does so by focusing on removing the primary sources of type violations, including unsafe uses of casts and unions.
面向对象思考
2020-11-10
586
0
C++核心准则SL.io.10:不使用printf函数群时应该调用sync_with_stdio(false)
c++
ios
Synchronizing iostreams with printf-style I/O can be costly. cin and cout are by default synchronized with printf.
面向对象思考
2020-10-30
468
0
C++核心准则SL.io.3:优先使用iostream进行I / O
c++
ios
iostreams are safe, flexible, and extensible.
面向对象思考
2020-10-30
909
0
关于C++异常,你必须知道的
c++
ide
本文是作者翻译过C++之父Bjarne Stroustrup的技术文章C++核心准则中有关C++中异常的文章之后的总结,希望读者通过本文可以对C++异常有一个全面,快速的了解:
面向对象思考
2020-10-30
584
0
C++核心准则SL.str.3:使用zstring或czstring引用C风格0结尾的字符串序列
c++
编程算法
linux
Readability. Statement of intent. A plain char* can be a pointer to a single character, a pointer to an array of characters, a pointer to a C-style (zero-terminated) string, or even to a small integer. Distinguishing these alternatives prevents misunderstandings and bugs.
面向对象思考
2020-10-30
730
0
C++核心准则SL.str.2:使用std::string_view或者gsl::span<char>参照字符序列
c++
编程算法
SL.str.2:使用std::string_view或gsl::span<char>参照字符序列
面向对象思考
2020-10-30
865
0
C++核心准则SL.str.1:使用std::string管理字符序列
网站
c++
编程算法
string correctly handles allocation, ownership, copying, gradual expansion, and offers a variety of useful operations.
面向对象思考
2020-10-30
480
0
C++核心准则SL.con.4:不要对不能直接拷贝的参数使用memset或memcpy
c++
编程算法
Doing so messes the semantics of the objects (e.g., by overwriting a vptr).
面向对象思考
2020-10-30
638
0
C++核心准则SL.con.3:避免越界错误
c++
Read or write beyond an allocated range of elements typically leads to bad errors, wrong results, crashes, and security violations.
面向对象思考
2020-10-30
629
0
C++核心准则SL.con.1:标准库array或vector好于C数组
编程算法
c++
linux
C arrays are less safe, and have no advantages over array and vector. For a fixed-length array, use std::array, which does not degenerate to a pointer when passed to a function and does know its size. Also, like a built-in array, a stack-allocated std::array keeps its elements on the stack. For a variable-length array, use std::vector, which additionally can change its size and handles memory allocation.
面向对象思考
2020-10-30
582
0
C++核心准则:积极、正确地使用标准库
c++
Save time. Don't re-invent the wheel. Don't replicate the work of others. Benefit from other people's work when they make improvements. Help other people when you make improvements.
面向对象思考
2020-10-30
331
0
点击加载更多
社区活动
【纪录片】中国数据库前世今生
穿越半个世纪,探寻中国数据库50年的发展历程
立即查看
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档