我有一个类管理文件的内容并将文件转换为二进制缓冲区,我有一个内部类,它是文件中的一个元素(基本上它代表一行)。喜欢:
class CSR{
private:
//some fields
public:
Elem operator[](int numRow);
//other methods
public:
class Elem{
private:
//other fields
public:
friend CSR::Elem CSR::operator[]( int r );
};
};
编译器(VS 2012 Express)告诉“CSR 没有成员运算符 []”