This is me to write a program const int knMaxAtOnce=1;
Int nStartIndex=19;
Int nVarIndex;
NVarIndex=1;
Double dValue;
BOOL bOK=TRUE;
Cstrings strValue;
COleSafeArray saValues;
DWORD dwElements [1].
LPTSTR pStrz;
Double * pdValue;
DwElements [0]=knMaxAtOnce;
SaValues. Create (VT_VARIANT, 1, dwElements);
SaValues. AccessData (* *) (void & amp; PdValue);
* pdValue=https://bbs.csdn.net/topics/100;
SaValues. UnaccessData ();
Mytrio. SetTable (nStartIndex nVarIndex, saValues);
In the last sentence to set breakpoints, saValues no I want to deposit 100
CodePudding user response:
Int iNums=100;
Double double * pData=https://bbs.csdn.net/topics/new [iNums];
for(int i=0; i{
PData [I]=I;
}
COleSafeArray ar;
Ar. CreateOneDim (VT_R8 iNums, pData);
.
The delete [] pData;
CodePudding user response: