.H and .cpp files

What would ho in a .H file and what will go in a .CPP file? why are there 2 types of files? How do you use multiple files?

Thanks in advance. :slight_smile:

Basically the .h (header) file describes what a class or program will do (variable declaration) while the .cpp file defines how the class will do it (methods and changes to variables).

You may find this page from Microsoft helpful:

and this StackOverflow post:

1 Like