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

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/26 23:50:46

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

类型转换,将p转换成Ball*.
static_cast dynamic_cast const_cast reinterpreted_cast
共有这四种转换,具体怎么用请查阅资料.