Skip to main content
1 vote
Accepted

PSet5 Hash Tables

It's always the simple ones that hide in plain sight. ;-) Look very carefully at this: Node* temp = malloc(sizeof(Node*)); The code allocates memory space that is sizeof what? A node or a pointer?...
Cliff B's user avatar
  • 69.1k
1 vote
Accepted

I am getting an unexpected sizeof() error

You're getting 12 because of something called alignment, which adds internal padding to structures. You can read more about it here: http://c-faq.com/struct/align.html https://en.wikipedia.org/wiki/...
Yuri Laguardia's user avatar
1 vote
Accepted

Pset4 recover: can't seem to use struct to identify the jpg

You're overthinking this. A struct is not necessary here. Why not try storing your identifiers in an array instead?
hotwebmatter's user avatar
  • 3,050

Only top scored, non community-wiki answers of a minimum length are eligible