Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
281 B
1
Indexable
Never
Hashtable *newHashtable()
{
    Hashtable *myHash = malloc(sizeof(Hashtable));
    myHash->table = (Element**)malloc (sizeof(Element*) * TABLE_SIZE);
    for ( int i=0; i<TABLE_SIZE; i++){
        myHash->table[i] = NULL;
    }
    myHash->length = 0;
    return myHash;
}