我想为友元函数指定默认值,如下所示:
friend Matrix rot90 (const Matrix& a, int k = 1);
使用Xcode 5.1.1编译此行时,出现以下错误
./Matrix.hh:156:19: error: friend declaration specifying a default argument must be a definition
修复它的正确方法是什么?
谢谢!
c++ c++11 xcode5
c++ ×1
c++11 ×1
xcode5 ×1