how can the searching code be created?
i've made a program named address book. now i wanna make a function that can search an existing contact details from the file through 2 ways
1) search by name
2) search by phone No.
kindly define me the code in C++
thx
kneel -2 Newbie Poster
Recommended Answers
Jump to PostThe simplest, but slowest, way is to do a linear search -- start from the beginning of the file, read each record until you get the one you want. For files written in text mode there isn't much more that can be done to speed up the searches.
A …
All 4 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
William Hemsworth 1,339 Posting Virtuoso
Alex Edwards 321 Posting Shark
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.