I have an win32 console phonebook application. Phone records are held as linked list.

struct Tel_dugum{ 
char name[NAMELEN]; 
char telno[TELNOLEN]; 
Tel_dugum *next; 
};

You can see the structure of the linked list above. My problem is when i search i dont want my app to search whole records list. For example when i entered "Jo" in search section i don't want it to look for it in K to Z section of my phonebook. Any idea how can i do that?
Regards.

Bad choice of data structures. Go with std::map

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.