Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
Type Casting (static_cast, dynamic_cast, const_cast, reinterpret_cast)
Last Updated: May 17, 2026
12 min read
Get Premium
Subscribe to unlock full access to all premium content
Subscribe Now
Reading Progress
0%
On this page
Implicit Conversions
Why C-Style Casts Are Dangerous
The Four Named Casts
static_cast<T>(x)
dynamic_cast<T*>(p)
const_cast<T>(x)
reinterpret_cast<T>(x)
Which Cast Do I Use?
A Side-by-Side Comparison
Summary
See What's New
Aa
Notes
Star
Complete
Ask AI
Comments
Notes
Star
Complete
Ask AI
If-Else Statements