conversion operator in C++
Conversion operators convert one concrete type to another concrete type or primitive type implicitly. It is similar to the operator overloading function in class. ``` #include <iostream> using namespace std; struct S { float num; }; class C { private: int num; public: C(int n) { num = n; } operator S() const { S s; s.num=num*1.1; return s; } }; int main() { C c(2); S s(c); cout << s.num << endl; } ```