phorce 131 Posting Whiz in Training Featured Poster

Hello,

I have been reading an article on comparing data, and have been given this code:

for(i = 0; i < matrix1W; i++)
{
    for(j = 0; j < matrix2H; j++)
    {
        diffSum += abs(matrix2->pData[(row+j)*backW+(col+i)] - marix1->pData[j*matrix2+i]);
    }
}

Now it works when using arrays, but, I'm using vectors, is it possible to convert this code to perform the calculation on vectors? It doesn't like the "->" or pData??

Any ideas would be great, thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.