class A
{
public:
};
class B
{
public:
operator A()
{
// code here
}
};
int main ()
{
A foo;
B bar;
foo=bar;
}
i am proceeding with this idea , that bar will typecast into A which will be assigned to foo as due to by default assignment operator in class A, but i receive error no proper conversion exist.