KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was reading some code written in C this evening, and at the top of the file was the function-like macro HASH: #define HASH(fp) (((unsigned long)fp)%NHASH) This left me wondering, why would somebody choose to implement a function this way using a function-like macro instead of implementing it as a regular vanilla C function? What are the advantages and disadvantages of each implementation? Thanks a bunch!
Tags (comma-separated)
Save Edits
Cancel