Based on the response to this question: Why does C++ have header files and CPP
I have seen the responses and understand the answers – so why didn’t this catch on? C# Java?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because it’s a quick, dirty and inelegant solution to the problem of interface vs. implementation.
It relies entirely on the C Preprocessor, which is about the bluntest tool in the drawer.
Other solutions avoid the following problems:
Dviljoen thinks I’m being quite hard on it, and he’s right. It is almost a 40-year old design, from the era of punch cards and paper tape. There’s an incredible amount of high-quality software built in C/C++ using the source/header file arrangement, despite all the potential gotchas and problems listed above.