I'm starting to learn Visual C++ (2010), I used to use Pascal, so:
- I don't quite understand what header files are for;
- what exactly is written in them (should be written).
If constants, function prototypes, macros, structure declarations, and similar information is used (is common) in several files with program code, then it is placed in a .h file, which is included in .c files (or other .h) by the #include preprocessor directive . That. shared data is not duplicated. They change in one place and these changes are consistently included in the program codes.