 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
vincent daanen Guest
|
Posted: Fri Jul 07, 2006 3:16 pm Post subject: Definition d'un namespace |
|
|
Bonjour,
je cherche a definir un namespace. Ca a l'air simple mais ca ne compile
pas et je ne sais pas pourquoi (compilo ms VC++ 6.0)
namespace _calcul
{
template <typename PixelType>
class A
{
public :
//! Les constructeurs
A()
{ };
A(const tableau2D<PixelType> &p_ima, const double *p_pPixelSize,
const Tranfo3D &p_OrientAndOffset = Tranfo3D ::IDENTITY)
{
m_image = p_ima;
m_imageOrientOffset = p_OrientAndOffset;
memcpy(m_pPixelSize,p_pPixelSize, 2*sizeof(double));
};
....
}
}
le compilo m'indique :
error C2629: unexpected 'class _volumeInterpolation::A<PixelType> ('
see reference to class template instantiation
'_calcul::A<PixelType>' being compiled
j'avoue ne pas voir l'erreur !
Quelqu'un a une idee ?
merci
V |
|
| Back to top |
|
 |
Fabien LE LEZ Guest
|
Posted: Fri Jul 07, 2006 3:27 pm Post subject: Re: Definition d'un namespace |
|
|
On Fri, 07 Jul 2006 12:16:36 +0200, vincent daanen
<vdaanen_NO_SPAM (AT) yahoo (DOT) fr>:
| Quote: | class A
{
public :
//! Les constructeurs
A()
{ };
|
Le point-virgule que tu as mis ici par erreur...
....devrait se trouver là.
On écrit :
class A
{
void f() { ... }
}; |
|
| Back to top |
|
 |
vincent daanen Guest
|
Posted: Fri Jul 07, 2006 5:53 pm Post subject: Re: Definition d'un namespace |
|
|
euh non, ca change rien !
mais l'erreur ne venait pas de la (erreur de frappe :-[ )
merci
V
Fabien LE LEZ a écrit :
| Quote: | On Fri, 07 Jul 2006 12:16:36 +0200, vincent daanen
vdaanen_NO_SPAM (AT) yahoo (DOT) fr>:
class A
{
public :
//! Les constructeurs
A()
{ };
Le point-virgule que tu as mis ici par erreur...
....
}
...devrait se trouver là.
On écrit :
class A
{
void f() { ... }
};
|
|
|
| Back to top |
|
 |
Fabien LE LEZ Guest
|
|
| Back to top |
|
 |
Arnaud Meurgues Guest
|
Posted: Fri Jul 07, 2006 8:02 pm Post subject: Re: Definition d'un namespace |
|
|
vincent daanen wrote:
| Quote: | namespace _calcul
{
template <typename PixelType
class A
{
public :
//! Les constructeurs
A()
{ };
A(const tableau2D<PixelType> &p_ima, const double *p_pPixelSize, const
Tranfo3D &p_OrientAndOffset = Tranfo3D ::IDENTITY)
{
m_image = p_ima;
m_imageOrientOffset = p_OrientAndOffset;
memcpy(m_pPixelSize,p_pPixelSize, 2*sizeof(double));
};
....
}
}
le compilo m'indique :
error C2629: unexpected 'class _volumeInterpolation::A<PixelType> ('
|
_volumeInterpolation n'apparaissant nulle part dans l'exemple que vous
nous donnez, c'est qu'il y a plus que ce que vous nous avez montré. Ce
plus pourrait aider à expliquer ce qui se passe.
Le mieux serait de produire un petit exemple complet (et court) qui
reproduit le problème.
--
Arnaud |
|
| Back to top |
|
 |
James Kanze Guest
|
Posted: Sun Jul 09, 2006 7:16 pm Post subject: Re: Definition d'un namespace |
|
|
Fabien LE LEZ wrote:
| Quote: | On Fri, 07 Jul 2006 12:16:36 +0200, vincent daanen
vdaanen_NO_SPAM (AT) yahoo (DOT) fr>:
class A
{
public :
//! Les constructeurs
A()
{ };
Le point-virgule que tu as mis ici par erreur...
|
Mais c'est permis.
| Quote: | ....
}
...devrait se trouver là.
|
Là, en effet, c'est obligatoire.
--
James Kanze kanze.james (AT) neuf (DOT) fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France +33 (0)1 30 23 00 34 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|