Bonjour,

J'utilise un programme écrit en C++ et lorsque je souhaite compiler une application j’obtiens le message d'erreur suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
In file included from mySolidParticleIO.C:27:
mySolidParticle.H:59: error: expected template-name before ‘<’ token
mySolidParticle.H:59: error: expected ‘{’ before ‘<’ token
mySolidParticle.H:59: error: expected unqualified-id before ‘<’ token
mySolidParticleIO.C:135: error: expected ‘}’ at end of inputIn file included from mySolidParticleCloud.H:42,
                 from mySolidParticle.C:27:
mySolidParticle.H:59: error: expected template-name before ‘<’ token
mySolidParticle.H:59: error: expected ‘{’ before ‘<’ token
mySolidParticle.H:59: error: expected unqualified-id before ‘<’ token
mySolidParticle.C:201: error: expected ‘}’ at end of input
 
make: *** [Make/linuxGccDPOpt/mySolidParticleIO.o] Erreur 1
make: *** Attente des tâches non terminées....
make: *** [Make/linuxGccDPOpt/mySolidParticle.o] Erreur 1

Voici le fichier mySolidParticle.H (seulement le début) :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
#ifndef solidParticle_H
#define solidParticle_H
 
#include "Particle.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "interpolationCellPoint.H"
#include "contiguous.H"
 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
namespace Foam
{
 
class solidParticleCloud;
 
/*---------------------------------------------------------------------------*\
                           Class solidParticle Declaration
\*---------------------------------------------------------------------------*/
 
class solidParticle : public Particle<solidParticle>
{
    // Private member data
 
        //- Diameter
about:startp        scalar d_;
 
        //- Velocity of parcel
        vector U_;
 
 
public:
 
    friend class Cloud<solidParticle>;
 
    //- Class used to pass tracking data to the trackToFace function
    class trackData
    {
        //- Reference to the cloud containing this particle
        solidParticleCloud& spc_;
L'erreur se situe sur la déclaration de classe solidParticle : public Particle<solidParticle> (ligne 22 dans mon message)
Je connais les bases du C++. J'ai beau chercher une solution à ce problème de compilation, je n'arrive pas à le résoudre. Est ce que quelqu'un aurait l'amabilité de m'aider sur ce point ?

Merci d'avance