I have a main class which is the menu and branches off to a few classes with execute's for each selection. I pass the array to the classes and need to search the array for different variables depending on the selection.
array input ex : new PropertyListing(1445, 'L', "Orleans", "50 x 90 service lot", 50000)
Say I'm searching for 1445 (listingNumber) how would I go about doing that? How would I match the listing number and the information with it?
Loop over the array and check every PropertyListing for 1445.
I have the while loop that loops through the entries and inListingNumber which is an int that the user enters
while(i < curList.currentListings.length && !false)
if(inListingNumber == curList.currentListings[i])
is what I have but the if statement gives me an operand error
curList.currentListings[i] should be a PropertyListing. So I think you need
if (inListingNumber == curList.currentListings[i].listingNumber)
I had tried putting that in there but put it in the wrong place.
Thanks again for the quick replies.