What is the correct type in c\c++ to store a COM's VT_DECIMAL?
问题 I'm trying to write a wrapper to ADO. A DECIMAL is one type a COM VARIANT can be, when the VARIANT type is VT_DECIMAL . I'm trying to put it in c native data type, and keep the variable value. it seem that the correct type is long double, but I get "no suitable conversion error". For example: _variant_t v; ... if(v.vt == VT_DECIMAL) { double d = (double)v; //this works but I'm afraid can be loss of data... long double ld1 = (long double)v; //error: more then one conversion from variant to