摘要
基于C++的面向对象程序设计时,类型转换方法多样。探讨了static_cast、dynamic_cast、const_cast与reinterpret_cast这四种转换方法的应用场景和注意事项,可以作为实际开发的参考。
In C++ object- oriented programming, methods of type casting are various. This paper discusses the applications and attentions of four type casting methods:static_cast, dynamic_cast, const__cast and reinterpret_cast, which can be used as the reference for C++ programming.
出处
《电脑与电信》
2010年第4期64-65,共2页
Computer & Telecommunication