您的位置:首页 > 其它

郁闷的一个指针误用

2013-01-30 10:20 363 查看
typedef _StructTest{

....

}StructTest, *PStructTest;

PStructTest pStruct = new StructTest

reinterpret_cast<const char*>(&pStruct) // --- 额额额额额

已经是一级指针了, 被本挫人引用成二级指针然后再转成一级指针来用, 结果很悲剧, 查了大半天............

wwwwwwwwwwwwwwwwwwwww
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: