I want to specify a default value for a friend function, as follows:
friend Matrix rot90 (const Matrix& a, int k = 1);
When compiling this line with Xcode 5.1.1, I get the following error
./Matrix.hh:156:19: error: friend declaration specifying a default argument must be a definition
What is the proper way of fixing it?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…