08/04/21 23:45:11
>>233の続きです
void throwDice()
{
srand((unsigned)time(NULL));
value=rand()%face+1;
}
int read()
{
return value;
}
}
int main()
{
Dice d6;
Dice d10(10);
d6.throwDice(6);
d10.throwDice();
cout<<"6面体の目:"<<d6.read()<<endl;
cout<<"10面体の目:"<<d10.read()<<endl;
return 0;
}
エラー2141 dice2.cpp5:宣言の構文エラーとでます
ソースの問題でしょうか?
お願いします