字符和字符串常数支持标准换码序列。
Character and string constants support the standard escape sequences.
此数据包括导入地址表、字符串常数、静态全局数据,等等。
This data includes the import address table, string constants, static global data, and so on.
常数可以是整数、字符、浮点数、字符串、Boolean、octet或枚举型,但不能是any类型或用户定义的类型。
Your constants can be integer, character, floating-point, string, Boolean, octet or enumerated but not of type any or a user-defined type. Here are some examples.
当复制到s1的字符串长于 s1 的分配大小(即BUFSIZE,一个在stdio.h中定义的常数)时,就会发生缓冲区溢出情况。
This can happen if the string copied into s1 is longer than the allocated size of s1, which is BUFSIZ (a constant defined in stdio.h).
这可以通过以下方法来避免:将常数字符串存储在某个本地数组中,然后将该数组用作函数的参数。
This can be avoided by storing the constant string into a local array and then using the array as the argument to the function.
因为编译器在静态只读内存中分配常数字符串,所以,尝试修改该内存会导致访问冲突和随机崩溃。
Because the compiler allocates constant strings in a static read-only memory, any attempts to modify it cause access violations and random crashes.
表达式可以使用在常数值、命令的退出代码、字符串、宏和文件系统路径上使用的运算符。
Expressions can use operators that act on constant values, exit codes from commands, strings, macros, and file-system paths.
此警告意味着将常数字符串用作可能修改该字符串内容的函数的参数。
This warning indicates the use of a constant string as an argument to a function that might modify the contents of that string.
此警告意味着将常数字符串用作可能修改该字符串内容的函数的参数。
This warning indicates the use of a constant string as an argument to a function that might modify the contents of that string.
应用推荐