![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Abstraction Mechanisms, Part 1 - slide 18 : 36 |
Given a user defined type T, programmed via a class or struct:
It is possible to convert from some type S to type T via constructors in T
It is possible to convert from type T to some type S via conversion operators in T
while (cin >> i) // convert istream to bool or int cout << i*2 << " " << endl;