when you make a .cpp file with just functions and call it your library, is it still proper to provide a .h file with it that has the functions prototypes in it?

Recommended Answers

All 2 Replies

Yes.

Absolutely. If you are going to use it anywhere at all, even in other parts of your code, you need to do that, otherwise it will just get repeated (probably incorrectly) all over the place. A header file is saying "These are the interfaces to useful stuff. If you use them, here are the calling conventions.".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.