First of all, decide whether a conversion between them is really natural and intuitive. In that case, you could use a constructor or a member function.
However, if the connection is not too natural, you may want to go with a separate ConversionUtils class with conversion methods or something like this. You don't want to start creating too many dependencies between classes or end up implementing n*n conversions.
It is also important to be careful with "conversion constructors", as they can be invoked without you realizing it. For example, if I have an a
and a b
and I write something like a==b
, the presence of a constructor in A or B that takes the other could result in successful compilation with no warning, and possibly interesting results at runtime. I would strongly encourage you to make your constructor explicit
in these cases.