C++

Asked • 09/30/19

When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used?

What are the proper uses of: - `static_cast` - `dynamic_cast` - `const_cast` - `reinterpret_cast` - C-style cast `(type)value` - Function-style cast `type(value)` How does one decide which to use in which specific cases?

1 Expert Answer

By:

David A. answered • 10/12/19

Tutor
4.7 (14)

Experienced C++ tutor who loves to mentor and pass on my knowledge

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.