const
const什么意思,const翻译
基本解释
n.: 常数;恒量
adj.: 恒定的;不变的
网络: 常量;常量定义;取值设为常数
英汉解释
不变的
恒定的
恒量
常数
例句
If you get this warning, examine your code to see if it depends on binding rvalues to non-const references.
如果接到这项警告,请检查您的程式码,查看是否依系结右值至非常数参考而产生。
bool remove(const path& p): This routine attempts to remove the file or directory being referred to by the path p.
boolremove(constpath&p):此例程将尝试删除路径p所引用的文件或目录。
Binding a reference to an R-Value is allowed as long as the reference is bound to a const type.
将引用与右值绑定像引用静态类型一样也是被允许的。
An rvalue cannot be bound to a non-const reference.
值无法系结至非常数参考。
A Const statement"s scope is the same as that of a variable declared in the same location.
一条Const语句的范围与在相同位置上声明的变量范围相同。
In a similar manner, a liter al integer const ant can be specified as being unsigned by following its value with either U or u.
类似地我们可以在整型文字常量的后面加上“u”或“U”,将其指定为一个无符号数。
Within a struct declaration, fields cannot be initialized unless they are declared as const or static.
在结构声明中,除非字段被声明为const或static,否则无法初始化。
bool exists(const path&): This function checks for the existence of a file.
boolexists(constpath&):此函数检查文件的扩展名。
You can fix this bug by editing the gregor. c file"s line 79 and removing the string const at the start of that line.
修复这个bug的方法是编辑gregor.c文件第79行,并删除该行开始部分的字符串const。
A const field can only be initialized at the declaration of the field.
const字段只能在该字段的声明中初始化。