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 

Type de retour et enum

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





PostPosted: Thu Oct 12, 2006 9:11 am    Post subject: Type de retour et enum Reply with quote



Bonjours,

Pourquoi gcc râle lorsque j'écris :

class maClass {

enum type_word {.....};
type_word type;

type_word get_type() const;

}

..../...

type_word maClass::get_type() const { return type; }

J'ai du écrire :(

int maClass::get_type() const { return type; } qui est "intellectuellement"
moins parlant

Merci.
Back to top
Bruno CAUSSE
Guest





PostPosted: Thu Oct 12, 2006 9:11 am    Post subject: Re: Type de retour et enum Reply with quote



dans l'article egktgt$jcl$1 (AT) s1 (DOT) news.oleane.net, GHU à gaetan_helleu (AT) yahoo (DOT) fr
a écrit le 12/10/06 10:15 :

Quote:

essaie :
maClass::type_word maClass::get_type() const { return type; }



bien sur, merci
Back to top
Yann Renard
Guest





PostPosted: Thu Oct 12, 2006 9:11 am    Post subject: Re: Type de retour et enum Reply with quote



Bruno CAUSSE wrote:
Quote:
Bonjours,

Pourquoi gcc râle lorsque j'écris :

class maClass {

enum type_word {.....};
type_word type;

type_word get_type() const;

}

.../...

type_word maClass::get_type() const { return type; }

J'ai du écrire :(

int maClass::get_type() const { return type; } qui est "intellectuellement"
moins parlant

Merci.

si type_word est déclaré dans la classe, essayez

maClass:type_word maClass::get_type() const { return type; }

Y
Back to top
GHU
Guest





PostPosted: Thu Oct 12, 2006 9:11 am    Post subject: Re: Type de retour et enum Reply with quote

essaie :
maClass::type_word maClass::get_type() const { return type; }

"Bruno CAUSSE" <envoi (AT) lesSpam (DOT) fr> a écrit dans le message de news:
C153C271.22633%envoi (AT) lesSpam (DOT) fr...
Quote:
Bonjours,

Pourquoi gcc râle lorsque j'écris :

class maClass {

enum type_word {.....};
type_word type;

type_word get_type() const;

}

.../...

type_word maClass::get_type() const { return type; }

J'ai du écrire :(

int maClass::get_type() const { return type; } qui est
"intellectuellement"
moins parlant

Merci.

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.