How to convert VARIANT to String (without MFC)?
May 25, 2008 at 5:32pm May 25, 2008 at 5:32pm UTC
Hi, I'm using Visual C++ Express.
I have a DLL which will receive data (variables) as VARIANT (this is obligatory).
The data is String, like 2008-01-22
so I did this:
1 2 3
VARIANT vDatum;
VariantInit(&vDatum);
variables[2]->GetValue(&vDatum);
but now later, I'm comparing it to String-Data from a text file
if ( strLine.substr(0,10).compare(str) == 0 )
so first I need to convert the Variant &vDatum to String.
How can I do this (without MFC)? Thanks.
May 25, 2008 at 7:02pm May 25, 2008 at 7:02pm UTC
I don't think you can (safely, at least).
What's wrong with MFC?
May 25, 2008 at 7:14pm May 25, 2008 at 7:14pm UTC
nothing at all..
it's not included in the free VC Expresss Version.
But I found a solution anyway, thanks.
Topic archived. No new replies allowed.