rndmBid=rand() % (sellPtr->sellPrice + (1.25*sellPtr->startPrice));
この行の何が問題になっていますか? (明らかに)以外はすべて整数1.25
であり、コンパイラは次のようなエラーを返しますinvalid operands of types 'int' and 'double' to binary 'operator%'.
startPrice
運が悪いので、 andrndmBid
を double に変更してみました。助言がありますか?