Search code examples
c++terminologyc++-faq

What's the difference between the terms "source file" and "translation unit"?


What's the difference between source file and translation unit?


Solution

  • From the C++ Standard:

    A source file together with all the headers and source files included via the preprocessing directive #include less any source line skipped by any of the conditional inclusion preprocessing directives is called a translation unit.