下面的代码有什么问题?它正在一些编译器中编译;但在某些编译器中它会抛出一个错误,说:
conversion from scalar to non scalar
有人可以帮忙解决这个问题吗?
#include <iostream>
#include <set>
using namespace std;
class base
{
typedef std::set<int> Sectors;
class subclass
{
public:
class subclass2
{
private :
Sectors::const_iterator it;
public :
subclass2(Sectors::const_iterator& it);
};
subclass2 begin();
private:
Sectors _sectors;
};
};
base::subclass::subclass2 base::subclass::begin()
{
return this->_sectors.begin();
}
int main()
{
return 0;
}