Resolved Question: bool operator in lottery program?
I am creating a function that will compare 2 lottery tickets right now i have bool function that is meant to return false if it doesnt match and true if it does. Here is the code, the only thing i cant seem to do is call this value and output true or false. how do you do that? bool operator==(lotto_ticket a, lotto_ticket b){ for (int i=1; i<=6; i++) { if (! (a.at(i) == b.at(i)) ) {return false; }sorry didnt see thatbool operator==(lotto_ticket a, lotto_ticket b){for (int i=1; i<=6; i++){if (! (a.at(i) == b.at(i)) ){return false; }elsereturn true;}ok but how do i call the function? lets say i wanna output that the result is false how do i do that?
Original post: Resolved Question: bool operator in lottery program? by Copyright © 2009 Yahoo! Inc. All rights reserved. at Yahoo! Answers: Search for
Tags: bool true function lotto_ticket lottery