For example
intIter i = intVec.begin();
dubIter j = dubVec.begin();
for (; i != intVec.end(); ++i && ++j)
{
result += (*i) * (*j);
}
you can declare several var. only of the same type in the for.
And are you sure with this part
++i && ++j
? I believe you want to write there
++i, ++j
So obviously you must read basics about for loop in C++