I use gdb to debug
in line 184 sum += fabs(entityVec[last2 + ii] - entityVec[last1 + ii] - relationVec[lastr + ii]);
once last2 is too big(for examble: 1775403720),
I print entityVec[1775403720]
there is a tip: Cannot access memory at address 0x80019e18db30
I have fixed bugs. The problem is not in the main body of the program but in the processing of data input. Please accept my apologies for my oversight.
I use gdb to debug in line 184 sum += fabs(entityVec[last2 + ii] - entityVec[last1 + ii] - relationVec[lastr + ii]); once last2 is too big(for examble: 1775403720), I print entityVec[1775403720] there is a tip: Cannot access memory at address 0x80019e18db30
I want to know how to fix this bug