Since you're using C++, you might want to take a look at the CNiMath class from Measurement Studio for C++. It has a LinearFit method that would be easier to use with C++ data types than CWStat.
I found the solution to my problem and it was easy! (but it drove me nuts to find it!) simply, declare a COleVariant, set it's vt to VT_BYREF | vt_R8 and set its pdblVal to the array. See code below: COleVariant x; x.vt = VT_BYREF |VT_R8; V.pdblVal = array1;