Skip to main content
Add reference links for explicit casts.
Source Link
Mateen Ulhaq
  • 27.9k
  • 21
  • 121
  • 155

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

What are the proper uses of:

How does one decide which to use in which specific cases?

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

What are the proper uses of:

How does one decide which to use in which specific cases?

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

What are the proper uses of:

How does one decide which to use in which specific cases?

Added link.
Source Link
Mateen Ulhaq
  • 27.9k
  • 21
  • 121
  • 155

What are the proper uses of:

How does one decide which to use in which specific cases?

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?

What are the proper uses of:

How does one decide which to use in which specific cases?

What are the proper uses of:

  • static_cast
  • dynamic_cast
  • const_cast
  • reinterpret_cast
  • C-style cast (type)value
  • Function-style cast type(value)

and howHow does one decide which one to use in awhich specific casecases?

What are the proper uses of:

  • static_cast
  • dynamic_cast
  • const_cast
  • reinterpret_cast
  • C-style cast (type)value
  • Function-style cast type(value)

and how does one decide which one to use in a specific case?

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?

Question Protected by πάντα ῥεῖ
added 69 characters in body
Source Link
Deduplicator
  • 46k
  • 7
  • 73
  • 125
Loading
deleted 351 characters in body
Source Link
sh03
  • 76.5k
  • 39
  • 177
  • 282
Loading
edited title
Link
sh03
  • 76.5k
  • 39
  • 177
  • 282
Loading
edited tags
Link
R. Martinho Fernandes
  • 236k
  • 73
  • 443
  • 518
Loading
"cast" is not code, just terminology. it was distracting.
Source Link
Assaf Lavie
  • 76.7k
  • 37
  • 152
  • 207
Loading
edited tags
Link
coppro
  • 14.6k
  • 5
  • 62
  • 73
Loading
Source Link
James Eichele
  • 119.5k
  • 42
  • 183
  • 214
Loading