diff --git a/code/p1e1.c b/code/p1e1.c new file mode 100644 index 0000000..54a790b --- /dev/null +++ b/code/p1e1.c @@ -0,0 +1,20 @@ +/** + * SAE 2.02 - Exploration algorithmique d’un problème + * Prtie 1 / Exercice _ + * Extrait code C + */ + +#define NAME_MAX_LEN 40 +#define NB_PTS_CARACT_MAX 10 + + +/** + * @brief structure caractérisant un point dans la ville + * + * Un point n'a besoin de connaître que les point qu'il peut relier. + */ +typedef struct pointCaracteristique { + char nom[NAME_MAX_LEN]; + struct pointCaracteristique *tPtsCaract; +} PointCaracteristique; + diff --git a/main.pdf b/main.pdf index 860b7f4..f350701 100644 Binary files a/main.pdf and b/main.pdf differ diff --git a/main.tex b/main.tex index 18925bd..10da0fb 100644 --- a/main.tex +++ b/main.tex @@ -41,6 +41,30 @@ \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} +% Code style +\usepackage{listings} +\usepackage{color} + \definecolor{dkgreen}{rgb}{0,0.6,0} + \definecolor{gray}{rgb}{0.5,0.5,0.5} + \definecolor{mauve}{rgb}{0.58,0,0.82} + \lstset{frame=tb, + language=C, + aboveskip=3mm, + belowskip=3mm, + showstringspaces=false, + columns=flexible, + basicstyle={\small\ttfamily}, + numbers=none, + numberstyle=\tiny\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{dkgreen}, + stringstyle=\color{mauve}, + breaklines=true, + breakatwhitespace=true, + tabsize=3 + } + + % Title \title{% \begin{minipage} diff --git a/sections/partie1.tex b/sections/partie1.tex index 7d98449..fe108b5 100644 --- a/sections/partie1.tex +++ b/sections/partie1.tex @@ -2,10 +2,23 @@ \documentclass[class=article, crop=false]{standalone} +%\usepackage[subpreambles=true]{standalone} +%\usepackage{listings} \begin{document} \section{Partie 1} - Ceci est la partie 1 de la SAE.% + + \subsection{Question 1} + % insert struct code here + \begin{lstlisting}[language=C] +typedef struct pointCaracteristique { + char nom[NAME_MAX_LEN]; + struct pointCaracteristique *tPtsCaract; +} PointCaracteristique; + \end{lstlisting} + + \subsection{Question 2} + \quad Un point caractéristique n'a besoin de connaître que les points qu'il peut atteindre. \end{document} \ No newline at end of file