I know I can create a _bstr_t with a float by doing:
mValue = _bstr_t(flt);
And I can format the float string by first declaring a c string:
char* str = new char[30];
sprintf(str, "%.7g", flt);
mValue = _bstr_t(str);
I am a bit rusty on c++, especially when it comes to _bstr_t which is A C++ class wrapper for the Visual Basic string type. Will the memory pointed to by str be managed by the _bstr_t object? My problem is passing the float (flt) into the constructor of the _bstr_t causes a float with a number 33.03434 to turn into "33,03434" if for instance my current language set is Italian. Is there another way to declare it perhaps?