这段代码有什么问题?封闭范围
class matrix{
private:
friend transpose(const matrix&);
friend class invert;
public: //...
};
matrix (*p)(const matrix&)=&transpose; //error: no transpose() in scope.
这句话是什么意思“的朋友声明不引入名字进入封闭的范围”。这不会发生问题时,朋友关键字已被移除
首先,你的'转置'缺少它的返回类型。 – Xeo 2012-01-18 16:05:59