【发布时间】:2016-03-08 05:46:26
【问题描述】:
我正在尝试制作二十一点模拟器。 Player 是一个类,用于存储从牌组中发来的牌。如何使用 try/catch 编写这个函数?
void Player::acceptCard(Card c)
{
// as long as there is space in the array myCards, place Card c into myCards
// if there is not enough space for another card, throw an exception
}
【问题讨论】: