2.1.6.1 : Le header



Écrivons le fichier accord_shadok.h :

Comme toujours, nous commençons avec les macros qui évitent les inclusions multiples de headers :
1
2
#ifndef __ACCORD_SHADOK_H__
#define __ACCORD_SHADOK_H__


Nous aurons besoin de chaînes de caractères :
1
#include <string>


Nous définissons notre fonction :
1
std::string accord_shadok(const std::string & name, size_t nbName);


Enfin, nous fermons notre macro :
1
#endif


Le fichier accord_shadok.h complet :

1
2
3
4
5
6
7
8
9
10
11
12
13
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/


#ifndef __ACCORD_SHADOK_H__
#define __ACCORD_SHADOK_H__
#include <string>
std::string accord_shadok(const std::string & name, size_t nbName);

#endif


Vous pouvez le télécharger ici.