The exact warning I get is
warning C4715: \'hand::show\' : not all control paths return a value
and hand::show is
std::ostr
The warning means it's possible to go through your method without returning any explicit value. With your code:
std::ostream& hand::show(std::ostream& os) const
{
if(side == left)
{
return os<
if side != left
and side != right
, then you don't return anything. A common way of fixing this problem is to assume, for example, if not "left" then always assume "right":
std::ostream& hand::show(std::ostream& os) const
{
if(side == left)
{
return os<