Unary Operator-() on zero values - c++
问题 I wrote this code to overload the unary operator- on a matrix class: const RegMatrix RegMatrix::operator-()const{ RegMatrix result(numRow,numCol); int i,j; for(i=0;i<numRow;++i) for(j=0;j<numCol;++j){ result.setElement(i,j,(-_matrix[i][j])); } return result; } When i ran my program with debugger in visual studio, it showed me that when the operation is done on a double equals zero, it inserts the result matrix the number -0.00000. Is it some weird VS-display feature, or is it something i