So from the comments: if col is float col[H][W];
, your trying to index vx/vy via a float. You would have to cast to int again:
int vx2 = vx[static_cast<int>(col[iposy][iposx])];
int vy2 = vy[static_cast<int>(col[iposy][iposx])];
Be careful: There is no implicit index checking, so if your floats are out of range (negative or > WIDTH/HEIGHT), you most probably run into a segmentation fault…
solved Error: invalid types ‘int [200][float]’ for array subscript