Up until this point, I have been using LIB files to construct libraries. However, I would like to experiment with header-only libraries. Is the following simple example acceptable practice?
Thanks for your reply. Would you mind answering a couple of clarification questions please?
1. For a simple example such as this one, one header file would be appropriate. However, in practice I will have many functions/classes and would like to keep the interface header as free of clutter as possible. In this case, would you still recommend merging the two files?
2. Assuming that I kept the two separate headers, should I inline both the prototype and the definition of the function?
1) I would think it would depend on your own preferences. All of the header only libs I've seen are all in one file though, maybe to reduce the # of files.