how to create converter between two custom types c++ code example Example: casting to a double in c++ double x; x = (double) 25;