jay_t55 jay_t55 - 1 year ago 136
C++ Question

CPP | .h files (C++)

I was just wondering what the difference between .cpp and .h files is? What would I use a h file for and what would I use a cpp file for? I'm sorry if this is a really dumb question.

thank you


Answer Source

In general, and it really could be a lot less general:

.h (header) files are for declarations of things that are used many times, and are #included in other files

.cpp (implementation) files are for everything else, and are almost never #included

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download