coursc/variables/59.tex

24 lines
457 B
TeX
Raw Permalink Normal View History

2014-02-24 17:38:56 +00:00
\begin{frame}[containsverbatim]
\frametitle{\secname}
\framesubtitle{\subsecname~: Les unions~III}
{\small\begin{exampleblock}{Exemple d'une union anonyme dans une structure}
\begin{verbatim}
struct Storage {
// union anonyme
union {
int a;
float b;
} value;
// enumeration anonyme
enum {
intVal,
floatVal
} type;
};
struct Storage s;
s.value.a = 3;
s.type = intVal;\end{verbatim}
\end{exampleblock}}
\end{frame}