关于类型转换!!!!!!!!!!!!
1.const int j = 100;
long address = (long)&j;
//...
2.const int j = 100;
long address = static_cast<long>&j;
//...
1是thinking in c++ 中的一个例子。
为什么把(long)&j换成static_cast<long>&j,会出现错误呢?
是不是因为(long)&j没有type-checking ,而static_cast<long>&j有type-checking