Hi, I am trying to convert a source from C++ to vb6:
C++:
static double mdArray[3][3];
static double mdArray2[3][3];
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
{
double sum = 0;
for(k = 0; k < 3; k++)
sum = sum + mdArray[k][i] * mdArray[k][k];
mdArray2[i][j] = sum
}
VB6:
dim mdArray(0 to 2, 0 to 2) as integer
dim mdArray2(0 to 2, 0 to 2) as integer
for i = 0 to 2
for j = 0 to 2
dim a as double
sum = 0
for k = 0 to 2
sum = sum + mdArray(k,i) * mdArray(k,j)
mdArray2(i,j) = sum
Next
Next
Next
Will the vb6 version yield the same result as the C++ version? Thanks.