![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CIM implementations | Godofredo | UNIX and Linux Applications | 0 | 03-25-2008 09:06 AM |
| Creating a Hash Table | callmetheskull | High Level Programming | 4 | 12-23-2007 03:17 PM |
| MD5 hash filename | bebar | Shell Programming and Scripting | 1 | 10-26-2007 01:44 PM |
| Creating a hash table using shell script | jyotipg | UNIX for Advanced & Expert Users | 2 | 10-29-2003 05:37 AM |
| How can i load or insert a table in oracle from c language thru unix environment | rramprasad | High Level Programming | 6 | 07-09-2002 12:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hash table implementations in C Language
Hello List,
Iam searching for a solution where i can use hash based searching . In Detail , I have linked list which will be dynamically increasing . I need a best searching mechanisim such a way that it can take only one itereation . Right now iam using linear search which is taking n-1 iteriations if we have n nodes in it. I cannot use binary search as i cannot arrange them in order because the node contains string variables. Please advice me regards Kanth |
|
||||
|
Why can you not sort string variables?
see: http://sourceforge.net/projects/judy/ for libjudy which will create associative arrays - which is what you probably should consider. |
|
||||
|
glib is probably a more "standard" choice for hash table, especially if you are on Linux or BSD as you probably already has it installed.
http://www.gtk.org/api/2.6/glib/glib-Hash-Tables.html |
|
||||
|
compiling the glib included programs in linux
thanks for your suggestions,
iam trying to use glib hashtables. here my problem is i could not able to compile a program which has glib.h as the include one. Code:
#include <stdio.h>
#include <glib.h>
int main(){
printf ( "Hello");
return 0;
}
gcc -I/usr/include/glib-2.0 -g glibtest.c -o glibtest.o In file included from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from glibtest.c:2: /usr/include/glib-2.0/glib/gtypes.h:30:24: glibconfig.h: No such file or directory In file included from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from glibtest.c:2: . . . . . . can any body advise my how to use glib thanks |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|