I don't understand what is wrong with this.
This is the line with the error: }while(playAgian());
Thank you :)
#include <iostream>
#include <string>
class Ice
{
public:
void hit(int playerLoco, int iceStrenth, int loco1, int loco2, int loco3);
int strenth;
class Loco
{
public:
int location;
bool hit;
};
};
void Ice::hit(int playerLoco, int iceStrenth, int loco1, int loco2, int loco3)
{
if(playerLoco == loco1 || playerLoco == loco2 || playerLoco == loco3)
iceStrenth = iceStrenth - 1;
}
int main(void)
{
Ice pie;
Ice::Loco pie1;
Ice::Loco pie2;
Ice::Loco pie3;
pie.strenth = 3;
pie1.location = 1;
pie2.location = 2;
pie3.location = 3;
using std::cout;
using std::cin;
do
{
void play();
bool playAgian();
}while(playAgian());
}
void play()
{
using std::cout;
cout << "Hi\n";
}
bool playAgian()
{
using std::cout;
using std::cin;
bool playAgian;
cout << "You scored points. Would you like to play agian? \n"
<< "[1] yes\n"
<< "[2] no\n";
cin >> playAgian;
return playAgian;
}