on-internet
← Community

I narrowed a segfault to 22 lines of code but I already accounted for null terminators in dynamic memory and variable limits, what else could it be?

Stack Overflow ·

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> // Linked List node struct node { // key is string char* key; // value is also string char* value; struct node* next; }; // like constructor void setNode(struct node* node, char* key, char* value) { node->key = key; node->value = value; node->next = NULL; return; }; struct hashMap { // Current number of elements in hashMap // and capacity of hashMap int numOfElements, capacity; // hold base address array of linked list struct node** arr; }; // like constructor void initializeHashMap(struct hashMap* mp) { // Default c

Comments

Sign in or sign up to comment and upvote.

No comments yet.