Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vector search

Status
Not open for further replies.

talib

Technical User
Nov 4, 2001
1
GB
hi all, wanted to know if it could be possible for you lot to give me some information on how to search through a vector, would be of great help. regards
talib
 
just use a normal search algorithm but make sure that when you reference a vector element you use elementAt(int index).

You will also need to use a comparison that will be effective for the type of object you are looking at in the vector. Don't forget there is a big difference between using various comparisons e.g. == and equals() etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top