Code:
else if (field.check_shot(row-1, col-1))
{
graphic(cout, 'H');
index = int(field.get_cell(row-1, col-1)) - 65;
field.change_grid(row-1, col-1, '*');
play.change_grid(row-1, col-1, 'H');
ship_arry[index].inc_hits(play);
system ("cls");
play.print_grid(cout);
field.add_hit();
}
I'm almost sure the ship_arry line is the one giving you trouble... it's not the function, I don't think, but the "ship_arry[index]" part. Does it matter where on the ship you hit, or what ship you hit? It sounds like you're trying to access a ship that's not there...
P.S. listen to hammer, he probably knows better than I do (damn you, fast typer! )