c++ - no duplicate function for a lottery program -
right im trying make function checks see if user’s selection in array , , if itll tell choose diff number. how can this?
do mean this?
bool checknumberisvalid() { for(int = 0 ; < array_length; ++i) { if(array[i] == user_selection) return false; } return true; }
that should give clue, @ least.
Comments
Post a Comment