Hi ive got a program with 2 Classes, Ship and Cell, both of which are in the namespace Battleships
Ship has 3 members, name, length and hits.
Cell has 2 members, state and a pointer to a ship.
The program makes a ship with a name and a length and then hits is 0 by default.
It then makes a cell which has a state and a pointer to the ship.
A function in Ship just adds +1 to hits.
How do i call this function from within the cell functions?
I want to be able to add a hit to whatever ship is pointed to from the cell but im not sure how.