SO i am in a bit of a predicament. For an assignement, I am asked to create a boolean function that includes a string (Specifically, one called bool (isValidEbayListingString(string auctionstring)). I know that a boolean function is supposed to return true or false statements. One of the ones I have written tells the code to produce a false statement if an empty string is input. However, how would I make it so that when the user enters a letter next to a number, it turns out true? Thanks?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
bool isValidEbayListingString(string auctionstring)
bool result = true;
if (auctionstring.length() == 0)
result = false;