What are the advantages and disadvantages of using header files in C or C ++, for example, in Java? I think classes should be designed from the outside, so it’s nice to have header files and don’t have to go through implementation details. However, again, each function declaration is duplicated in two files. If C and C ++ were invented today, would they use header files? Is this mechanism outdated or necessary?
source
share