Ok It's prolly sth really basic but I give up. I just wanted to check answer for a question: Is compilator gonna protest?
cell->unregister(); cell.erase(); So I wrote a simplest script in c++ to check:
/* * main.cpp * * Created on: Aug 7, 2014 * Author: luke */ #include <iostream> #include <cstdlib> using namespace std; class abs { int a,b; public: void unregister(){ a = 0; b = 0; } void erase(){ a = 2; b = 0; } abs(int c,int d); }; abs::abs(int c,int d){ a = c; b = d; } int main () { abs obj(4, 2); obj->unregister(); obj.erase(); } The errors I get are:
Description Resource Path Location Type statement cannot resolve address of overloaded function main.cpp /testing line 32 C/C++ Problem
Description Resource Path Location Type Method 'unregister' could not be resolved main.cpp /testing line 34 Semantic Error
Description Resource Path Location Type Method 'erase' could not be resolved main.cpp /testing line 35 Semantic Error
Description Resource Path Location Type make: * [main.o] Error 1 testing C/C++ Problem
Description Resource Path Location Type expected ‘;’ before ‘obj’ main.cpp /testing line 32 C/C++ Problem
Description Resource Path Location Type ‘obj’ was not declared in this scope main.cpp /testing line 34 C/C++ Problem
->unregister()and not.unregister()? The->syntax is not valid here.obj->unregister()is not correct because obj is not a pointer. You should replace withobj.unregister(). Is this the problem ?