I've got another problem when trying to overload the () operator for array access:
const OctTreeNode*& operator()(const int i, const int j, const int k) const{
return m_cells[k*m_resSqr+j*m_res+i];
}
OctTreeNode*& operator()(const int i, const int j, const int k){
return m_cells[k*m_resSqr+j*m_res+i];
}
vector<OctTreeNode*> m_cells;
I get a
C2440 'return': cannot convert from 'OctTreeNode *const' to 'const OctTreeNode *&'
what's the deal? i'm declaring it exactly as in another class. the only difference is that the other class is generic, and there i'm using T& instead of OctreeNode*&