<s>
In	O
C	B-Language
and	O
C++	B-Language
programming	I-Language
language	I-Language
terminology	O
,	O
a	O
translation	B-Language
unit	I-Language
(	O
or	O
more	O
casually	O
a	O
compilation	B-Language
unit	I-Language
)	O
is	O
the	O
ultimate	O
input	O
to	O
a	O
C	B-Language
or	O
C++	B-Language
compiler	B-Language
from	O
which	O
an	O
object	B-Application
file	I-Application
is	O
generated	O
.	O
</s>
<s>
A	O
translation	B-Language
unit	I-Language
roughly	O
consists	O
of	O
a	O
source	O
file	O
after	O
it	O
has	O
been	O
processed	O
by	O
the	O
C	B-Language
preprocessor	I-Language
,	O
meaning	O
that	O
header	B-Language
files	I-Language
listed	O
in	O
#include	O
directives	O
are	O
literally	O
included	O
,	O
sections	O
of	O
code	O
within	O
#ifndef	O
may	O
be	O
included	O
,	O
and	O
macros	O
have	O
been	O
expanded	O
.	O
</s>
<s>
A	O
C	B-Language
program	I-Language
consists	O
of	O
units	O
called	O
source	O
files	O
(	O
or	O
preprocessing	O
files	O
)	O
,	O
which	O
,	O
in	O
addition	O
to	O
source	O
code	O
,	O
includes	O
directives	O
for	O
the	O
C	B-Language
preprocessor	I-Language
.	O
</s>
<s>
A	O
translation	B-Language
unit	I-Language
is	O
the	O
output	O
of	O
the	O
C	B-Language
preprocessor	I-Language
–	O
a	O
source	O
file	O
after	O
it	O
has	O
been	O
preprocessed	B-General_Concept
.	O
</s>
<s>
Preprocessing	O
notably	O
consists	O
of	O
expanding	O
a	O
source	O
file	O
to	O
recursively	O
replace	O
all	O
#include	O
directives	O
with	O
the	O
literal	O
file	O
declared	O
in	O
the	O
directive	O
(	O
usually	O
header	B-Language
files	I-Language
,	O
but	O
possibly	O
other	O
source	O
files	O
)	O
;	O
the	O
result	O
of	O
this	O
step	O
is	O
a	O
preprocessing	O
translation	B-Language
unit	I-Language
.	O
</s>
<s>
Further	O
steps	O
include	O
macro	O
expansion	O
of	O
#define	O
directives	O
,	O
and	O
conditional	B-Application
compilation	I-Application
of	O
#ifdef	O
directives	O
,	O
among	O
others	O
;	O
this	O
translates	O
the	O
preprocessing	O
translation	B-Language
unit	I-Language
into	O
a	O
translation	B-Language
unit	I-Language
.	O
</s>
<s>
From	O
a	O
translation	B-Language
unit	I-Language
,	O
the	O
compiler	B-Language
generates	O
an	O
object	B-Application
file	I-Application
,	O
which	O
can	O
be	O
further	O
processed	O
and	O
linked	B-Application
(	O
possibly	O
with	O
other	O
object	B-Application
files	I-Application
)	O
to	O
form	O
an	O
executable	B-Application
program	I-Application
.	O
</s>
<s>
Note	O
that	O
the	O
preprocessor	B-General_Concept
is	O
in	O
principle	O
language	O
agnostic	O
,	O
and	O
is	O
a	O
lexical	O
preprocessor	B-General_Concept
,	O
working	O
at	O
the	O
lexical	B-Application
analysis	I-Application
level	O
–	O
it	O
does	O
not	O
do	O
parsing	O
,	O
and	O
thus	O
is	O
unable	O
to	O
do	O
any	O
processing	O
specific	O
to	O
C	B-Language
syntax	O
.	O
</s>
<s>
The	O
input	O
to	O
the	O
compiler	B-Language
is	O
the	O
translation	B-Language
unit	I-Language
,	O
and	O
thus	O
it	O
does	O
not	O
see	O
any	O
preprocessor	B-General_Concept
directives	O
,	O
which	O
have	O
all	O
been	O
processed	O
before	O
compiling	B-Language
starts	O
.	O
</s>
<s>
While	O
a	O
given	O
translation	B-Language
unit	I-Language
is	O
fundamentally	O
based	O
on	O
a	O
file	O
,	O
the	O
actual	O
source	O
code	O
fed	O
into	O
the	O
compiler	B-Language
may	O
appear	O
substantially	O
different	O
than	O
the	O
source	O
file	O
that	O
the	O
programmer	O
views	O
,	O
particularly	O
due	O
to	O
the	O
recursive	O
inclusion	O
of	O
headers	O
.	O
</s>
<s>
Translation	B-Language
units	I-Language
define	O
a	O
scope	B-Language
,	O
roughly	O
file	O
scope	B-Language
,	O
and	O
functioning	O
similarly	O
to	O
module	O
scope	B-Language
;	O
in	O
C	B-Language
terminology	O
this	O
is	O
referred	O
to	O
as	O
internal	B-Language
linkage	I-Language
,	O
which	O
is	O
one	O
of	O
the	O
two	O
forms	O
of	O
linkage	B-Language
in	O
C	B-Language
.	O
Names	O
(	O
functions	O
and	O
variables	O
)	O
declared	O
outside	O
of	O
a	O
function	O
block	O
may	O
be	O
visible	O
either	O
only	O
within	O
a	O
given	O
translation	B-Language
unit	I-Language
,	O
in	O
which	O
case	O
they	O
are	O
said	O
to	O
have	O
internal	B-Language
linkage	I-Language
–	O
they	O
are	O
not	O
visible	O
to	O
the	O
linker	B-Application
–	O
or	O
may	O
be	O
visible	O
to	O
other	O
object	B-Application
files	I-Application
,	O
in	O
which	O
case	O
they	O
are	O
said	O
to	O
have	O
external	B-Language
linkage	I-Language
,	O
and	O
are	O
visible	O
to	O
the	O
linker	B-Application
.	O
</s>
<s>
C	B-Language
does	O
not	O
have	O
a	O
notion	O
of	O
modules	O
.	O
</s>
<s>
However	O
,	O
separate	O
object	B-Application
files	I-Application
(	O
and	O
hence	O
also	O
the	O
translation	B-Language
units	I-Language
used	O
to	O
produce	O
object	B-Application
files	I-Application
)	O
function	O
similarly	O
to	O
separate	O
modules	O
,	O
and	O
if	O
a	O
source	O
file	O
does	O
not	O
include	O
other	O
source	O
files	O
,	O
internal	B-Language
linkage	I-Language
(	O
translation	B-Language
unit	I-Language
scope	B-Language
)	O
may	O
be	O
thought	O
of	O
as	O
"	O
file	O
scope	B-Language
,	O
including	O
all	O
header	B-Language
files	I-Language
"	O
.	O
</s>
<s>
The	O
bulk	O
of	O
a	O
project	O
's	O
code	O
is	O
typically	O
held	O
in	O
files	O
with	O
a	O
.c	B-Language
suffix	O
(	O
or	O
.cpp	O
,	O
.cxx	B-Language
or	O
.cc	O
for	O
C++	B-Language
,	O
of	O
which	O
.cpp	O
is	O
used	O
most	O
conventionally	O
)	O
.	O
</s>
<s>
Files	O
intended	O
to	O
be	O
included	O
typically	O
have	O
a	O
.h	B-Language
suffix	O
(	O
.hpp	O
or	O
.hh	O
are	O
also	O
used	O
for	O
C++	B-Language
,	O
but	O
.h	B-Language
is	O
the	O
most	O
common	O
even	O
for	O
C++	B-Language
)	O
,	O
and	O
generally	O
do	O
not	O
contain	O
function	O
or	O
variable	O
definitions	O
to	O
avoid	O
name	O
conflicts	O
when	O
headers	O
are	O
included	O
in	O
multiple	O
source	O
files	O
,	O
as	O
is	O
often	O
the	O
case	O
.	O
</s>
<s>
Header	B-Language
files	I-Language
can	O
be	O
,	O
and	O
often	O
are	O
,	O
included	O
in	O
other	O
header	B-Language
files	I-Language
.	O
</s>
<s>
It	O
is	O
standard	O
practice	O
for	O
all	O
.c	B-Language
files	O
in	O
a	O
project	O
to	O
include	O
at	O
least	O
one	O
.h	B-Language
file	O
.	O
</s>
