0_0_18835948_23662.cpp: In function 'int main()': 0_0_18835948_23662.cpp:52:13: error: 'unit_mat' was not declared in this scope unit_mat.mat[i][j]=((i==j)?1:0); ^