C++ 高手请进union
{
BYTE short[8];
DWORD short;
DWORD long;
} SIZE;
program() = #SIZE;
trace.setDest(#SIZE);
请问 #SIZE是什么意思啊?
"#" 这里的用意是什么? 取地址?
多谢![hchen2002 (5-9 16:16, Long long ago)]
[ 传统版 |
sForum ][登录后回复]1楼
i doubt the correctness of the codeshort and long are reserved keywords in c++ but they are
used as variable names here. this will certainly produce compilation errors.
# is used for preprocessing directives rather than an operator. by the way, & is the right one to take address. [va (5-10 14:26, Long long ago)]
[ 传统版 |
sForum ][登录后回复]2楼
This is NOT valid C++.Keywords such as short, long are used as identifiers.
Please check your code fragment.[Flying (5-10 16:13, Long long ago)]
[ 传统版 |
sForum ][登录后回复]3楼
SystemC?Anyway, not C or C++...Check the source, maybe it is a proprietary lanugage...[kelvin (5-10 21:03, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼