What is a “translation unit” in C++

前端 未结 11 695
既然无缘
既然无缘 2020-11-21 07:56

I am reading at the time the \"Effective C++\" written by Meyers and came across the term \"translation unit\".

Could somebody please give me an explanation of:

11条回答
  •  既然无缘
    2020-11-21 08:46

    As others have said, a translation unit is basically the contents of a source file after preprocessing. It's the topmost production in the language grammar; you would only need to worry about it if you were writing a C or C++ compiler.

提交回复
热议问题