我正在查看一些c ++代码,我遇到了这个:
if( (size & 0x03L) != 0 )
throw MalformedBundleException( "bundle size must be multiple of four" );
Run Code Online (Sandbox Code Playgroud)
L在十六进制值之后的含义是什么?
它是如何改变价值的0x03?
此后缀设置数字文字的类型.L代表long; LL代表long long类型.该数字不需要是十六进制 - 它也适用于小数和八进制.
3LL // A decimal constant 3 of type long long
03L // An octal constant 3 of type long
0x3L // A hex constant 3 of type long
Run Code Online (Sandbox Code Playgroud)