o_alive is a char
status() return the value of o_alive in an organism_cell.
It gives me the error "expected `)' before ‘::’ token"
Now, I'm assuming the error lies with the "this::o_alive". but I'm not exactly sure what is should be. I've tried just "o_alive", "status()" and "this.status()" which give the error "passing ‘const organism_cell’ as ‘this’ argument of ‘char organism_cell::status()’ discards qualifiers", as well as "this::status()" which gave the same error as the topic title.
this is a pointer to the object itself. :: has to do with scope and it doens't make any sense to use it here. What you're looking for is this->o_alive. The -> operator is an operator for pointers to objects used to access membervariables of the object the pointer is pointing to; the previous code is equal to (*this).o_alive. However, simply using o_alive should work to, if o_alive is a membervariable of the class organism_cell.
And then I get the error of "passing ‘const organism_cell’ as ‘this’ argument of ‘char organism_cell::status()’ discards qualifiers", which too me is still clear as mud unfortunately.