I am new to C ++ and am a little versed in writing C ++.
According to the “C ++ Primer”, the old style is similar: an int (variable) or (int) variable, while the new ones introduced by the C ++ standard include static_cast <>, const_cast <>, reinterpret_cast <>, and dynamic_cast <>.
Is static_cast <> the equivalent of "old style"?
I think this is not so, if I consider the basic data types (int, double ...) as a class, then it would be convenient to use only int (object) to perform casting? Does C ++ standardly implement base types as a class?
b4283 source
share