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