You cannot overload an assignment operator as a free function, meaning it must be a class member. Since double is no class, that means you have no way to write an assignment afor double.
The only thing that is left is writing a conversion operator for your class:
class Fraction {
//...
public:
double toDouble() const { return n/d; }
operator double() const { return toDouble(); }
};
Having said that, this means you can use a fraction wherever you need a double, int, float, because the compiler uses the operator for implicit conversions, not only to double but also to int and other types that have possible builtin conversion from double. This can be desired for some classes, but it can lead to ambiguities and errors, because one often overlooks the conversion opportuinities the compiler takes into account.
In C++11 there is the possibility to make the operator explicit:
explicit operator double() const { return toDouble(); }
This would mean that implicit conversion are not allowed, and copy-initialization won't work, but direct initialization will:
double dbl = frac; //Error
double dbl{frac}; //Ok
A little sidenote: you should make that conversion function const.