C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Definition d'un namespace

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
vincent daanen
Guest





PostPosted: Fri Jul 07, 2006 3:16 pm    Post subject: Definition d'un namespace Reply with quote



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





PostPosted: Fri Jul 07, 2006 3:27 pm    Post subject: Re: Definition d'un namespace Reply with quote



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...
Quote:
....
}

....devrait se trouver là.

On écrit :

class A
{
void f() { ... }
};
Back to top
vincent daanen
Guest





PostPosted: Fri Jul 07, 2006 5:53 pm    Post subject: Re: Definition d'un namespace Reply with quote



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





PostPosted: Fri Jul 07, 2006 6:41 pm    Post subject: Re: Definition d'un namespace Reply with quote

Merci de répondre à l'endroit.
http://www.usenet-fr.net/fr.usenet.reponses/usenet/repondre-sur-usenet.html
Back to top
Arnaud Meurgues
Guest





PostPosted: Fri Jul 07, 2006 8:02 pm    Post subject: Re: Definition d'un namespace Reply with quote

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





PostPosted: Sun Jul 09, 2006 7:16 pm    Post subject: Re: Definition d'un namespace Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.