How is implemented?

2019-03-21 04:52发布

C doesn't have (to the best of my knowledge) overloading or templates, right? So how can a set of type-agnostic functions with the same name exist in plain ol' C? The usual compile-time trickery would involve a whole bunch of macros, wouldn't it?

标签: c overloading
1条回答
手持菜刀,她持情操
2楼-- · 2019-03-21 05:20

There's a great explanation of how it works in GCC here.

Also, if anyone can solve the medium-difficulty exercise, I'd love to know the answer.

查看更多
登录 后发表回答