Ball* ball = static_cast(p);这句代码什么意思?

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 18:12:07
Ball* ball = static_cast(p);这句代码什么意思?

Ball* ball = static_cast(p);这句代码什么意思?
Ball* ball = static_cast(p);这句代码什么意思?

Ball* ball = static_cast(p);这句代码什么意思?
类型转换,将p转换成Ball*.
static_cast dynamic_cast const_cast reinterpreted_cast
共有这四种转换,具体怎么用请查阅资料.