int main(){ Mat C = (Mat_(3,3) << 0, -1, 0, -1, 5, -1, 0, -1, 0); cout << "Total matrix:" << endl; cout << C << endl; Mat A = (Mat_(1,3) << 2, 3, 5); Mat dsttemp = C.row(2); //M为目的矩阵 n*m A.copyTo(dsttemp); // cout << dsttemp< cout << C< return 0; }