Jump to content

Implicit type conversion: Difference between revisions

m
C++
(Added C++ implementation)
m (C++)
Line 222:
 
=={{header|C++}}==
C++ supports almost all of the same implicit conversions as the [[Implicit_type_conversion#C|C]] example above. However it does not allow implicit conversions to enums and is more strict with some pointer conversions. C++ allows implicit conversions on user defined
types. The example below shows implicit conversions between polar and Cartesian points.
<lang cpp>#include <iostream>
125

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.