Can I write C++ code without headers (repetitive function declarations)?

前端 未结 24 929
半阙折子戏
半阙折子戏 2020-11-28 07:55

Is there any way to not have to write function declarations twice (headers) and still retain the same scalability in compiling, clarity in debugging, and flexibility in desi

24条回答
  •  悲哀的现实
    2020-11-28 08:23

    Learn to recognize that header files are a good thing. They separate how codes appears to another user from the implementation of how it actually performs its operations.

    When I use someone's code I do now want to have to wade through all of the implementation to see what the methods are on a class. I care about what the code does, not how it does it.

提交回复
热议问题