If this is MFC, yes definitly.
In MFC you can also take advantage of the COleVariant class.
No MFC but VC++ you can use the _variant_t class, which is IMO better than COleVariant. It's in some strange header, look it up in the reference.