I know source code is what we write as a code and translation unit includes a source file and source files included via directive. Then what is the difference between the two?
Asked
Active
Viewed 67 times
1 Answers
1
"Translation unit" refers to a particular structure made out of source code. You organize your source code into headers and implementation files, then you construct translation units out of those files, then you construct programs out of translation units.
Perhaps an analogy would help:
bridge : steel beam : steel
::
program : translation unit : source code

Brian Bi
- 111,498
- 10
- 176
- 312