IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Visual C++ Discussion :

Des méthodes déclarés static dans la classe ne sont pas reconnues


Sujet :

Visual C++

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre extrêmement actif
    Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2008
    Messages
    1 022
    Détails du profil
    Informations personnelles :
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Décembre 2008
    Messages : 1 022
    Par défaut Des méthodes déclarés static dans la classe ne sont pas reconnues
    bonjour
    J'ai déclarés des méthodes static dans la classe qui me sont pas reconnus par le compilateur
    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
    42
    43
    44
    45
    46
    /*******************************************************************************
     * NOM: Propositions.h
     * ROLE:
     * HISTORIQUE:
     * 05/05/2003, yab, initial version
    *******************************************************************************/
    #ifndef PROPOSITION_H
    #define PROPOSITION_H
    /*_____INCLUDE-FILES__________________________________________________________*/
    /*_____GLOBAL-DEFINE__________________________________________________________*/
    /*_____GLOBAL-TYPES___________________________________________________________*/
    /*_____GLOBAL-DATA____________________________________________________________*/
     
    /*_____GLOBAL-MACROS__________________________________________________________*/
    /*_____GLOBAL-FUNCTIONS-PROTOTYPES____________________________________________*/
    /*_____CLASS-DEFINITION_______________________________________________________*/
    namespace SpecificationLoader
    {
        using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	using namespace System::IO;
    	namespace Word = Microsoft::Office::Interop::Word;
     
    	class CProposition
    	{
    		public:
    			CProposition::CProposition();
    			CProposition::~CProposition();
    			static CAnalysedWord* CProposition::PoseMark( std::wstring str, enPOS pos, int ulLength);
    			static void CProposition::AnalysePrecondition( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CElementSemantique *pCurrentElement, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool* pbNewSegment, bool &bIsInList, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void CProposition::AnalyseQualificateur( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool &bMarkDeleted, bool &bNewSegmentOngoing, bool* pbNewSegment, bool &bIsInList, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void CProposition::AnalysePredicat( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool &bIsStopped, bool* pbNewSegment, bool &bIsInList, bool &bNewSegmentOngoing, bool &bIsPredicatAllocated, bool &bMarkDeleted, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void CProposition::AnalyseOther( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, std::wstring wsNextUnivers ,CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool* pbNewSegment, bool &bIsInList, bool &bNewSegmentOngoing, bool &bIsPredicatAllocated, bool &bMarkDeleted, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk);
    			static void CProposition::InitiateProposition( std::list<CAnalysedChunk *>::iterator itChunk, CAnalysedSegment* pSegment, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, bool* pbNewSegment, bool &bNounPending, bool &bIsInList, bool &bIsPredicatAllocated, bool &bIsPreconditionAllocated , bool &bWasPredicatAllocated, bool &bWasPreconditionAllocated, enChunkType &Curpos, int &iAlloc, int &Step, std::wstring &wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk);
    			static void CProposition::ProcessPassiveFromPresentParticiple( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTitle, bool * pbNewSegment, bool &bIsStopped, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static bool CProposition::ProcessPassiveFromPassive(  std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTtitle, bool * pbNewSegment, bool &bIsStopped, std::list<CAnalysedChunk *>::iterator itChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static void CProposition::ExecutePassiveAndFormatResult(  std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CAnalysedSegment* pInternalSegment, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CLinguisticSegment *pNewLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTitle, bool * pbNewSegment, bool &bIsStopped, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static erc CProposition::ExtractQPCA( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CAnalysedChunk* pChunkSujet, bool bTitle, bool* pbNewSegment, int iIdDoc);
    	};
    	extern SpecificationLoader::CProposition objProposition;
    };
    #endif /* PROPOSITION_H */
    et le compilateur me réponds:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(196): error C2352: 'SpecificationLoader::CProposition::AnalysePrecondition'*: appel non conforme d'une fonction membre non static
    1>          D:\usr\Memoria\dev\Linguistic\Analyser\com\Proposition.h(34)*: voir la déclaration de 'SpecificationLoader::CProposition::AnalysePrecondition'
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(419): error C2352: 'SpecificationLoader::CProposition::AnalysePrecondition'*: appel non conforme d'une fonction membre non static
    1>          D:\usr\Memoria\dev\Linguistic\Analyser\com\Proposition.h(34)*: voir la déclaration de 'SpecificationLoader::CProposition::AnalysePrecondition'
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(572): error C2352: 'SpecificationLoader::CProposition::AnalysePrecondition'*: appel non conforme d'une fonction membre non static
    1>          D:\usr\Memoria\dev\Linguistic\Analyser\com\Proposition.h(34)*: voir la déclaration de 'SpecificationLoader::CProposition::AnalysePrecondition'
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(628): error C2352: 'SpecificationLoader::CProposition::PoseMark'*: appel non conforme d'une fonction membre non static
    1>          D:\usr\Memoria\dev\Linguistic\Analyser\com\Proposition.h(33)*: voir la déclaration de 'SpecificationLoader::CProposition::PoseMark'
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(1870): warning C4018: '>'*: incompatibilité signed/unsigned
    1>..\..\..\..\Linguistic\Analyser\src\ngramer.cpp(1901): error C2352: 'SpecificationLoader::CProposition::PoseMark'*: appel non conforme d'une fonction membre non static
    1>          D:\usr\Memoria\dev\Linguistic\Analyser\com\Proposition.h(33)*: voir la déclaration de 'SpecificationLoader::CProposition::PoseMark'
    qui m'aidera sera

  2. #2
    Expert confirmé
    Homme Profil pro
    Ingénieur développement matériel électronique
    Inscrit en
    Décembre 2015
    Messages
    1 599
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 62
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Ingénieur développement matériel électronique
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Décembre 2015
    Messages : 1 599
    Par défaut
    Bonjour,

    Dans la déclaration, il ne faut pas rappeler le nom de la classe devant le nom de la méthode.

    p.e : static CAnalysedWord* CProposition :: PoseMark( std::wstring str, enPOS pos, int ulLength);
    doit être : static CAnalysedWord* PoseMark( std::wstring str, enPOS pos, int ulLength);

  3. #3
    Membre extrêmement actif
    Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2008
    Messages
    1 022
    Détails du profil
    Informations personnelles :
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Décembre 2008
    Messages : 1 022
    Par défaut J'ai suivi votre conseil
    J'ai suivi votre conseil mais ça n'a rien changé

  4. #4
    Expert confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2005
    Messages
    5 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Conseil

    Informations forums :
    Inscription : Février 2005
    Messages : 5 493
    Par défaut
    Montrez vos modifications.

  5. #5
    Membre extrêmement actif
    Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2008
    Messages
    1 022
    Détails du profil
    Informations personnelles :
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Décembre 2008
    Messages : 1 022
    Par défaut Je les met
    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
    42
    43
    44
    45
    46
    /*******************************************************************************
     * NOM: Propositions.h
     * ROLE:
     * HISTORIQUE:
     * 05/05/2003, yab, initial version
    *******************************************************************************/
    #ifndef PROPOSITION_H
    #define PROPOSITION_H
    /*_____INCLUDE-FILES__________________________________________________________*/
    /*_____GLOBAL-DEFINE__________________________________________________________*/
    /*_____GLOBAL-TYPES___________________________________________________________*/
    /*_____GLOBAL-DATA____________________________________________________________*/
     
    /*_____GLOBAL-MACROS__________________________________________________________*/
    /*_____GLOBAL-FUNCTIONS-PROTOTYPES____________________________________________*/
    /*_____CLASS-DEFINITION_______________________________________________________*/
    namespace SpecificationLoader
    {
        using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	using namespace System::IO;
    	namespace Word = Microsoft::Office::Interop::Word;
     
    	class CProposition
    	{
    		public:
    			CProposition();
    			~CProposition();
    			static CAnalysedWord* PoseMark( std::wstring str, enPOS pos, int ulLength);
    			static void AnalysePrecondition( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CElementSemantique *pCurrentElement, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool* pbNewSegment, bool &bIsInList, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void AnalyseQualificateur( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool &bMarkDeleted, bool &bNewSegmentOngoing, bool* pbNewSegment, bool &bIsInList, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void AnalysePredicat( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool &bIsStopped, bool* pbNewSegment, bool &bIsInList, bool &bNewSegmentOngoing, bool &bIsPredicatAllocated, bool &bMarkDeleted, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk, CAnalysedChunk *pNext3Chunk);
    			static void AnalyseOther( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, std::wstring wsNextUnivers ,CAnalysedChunk* pChunk, CAnalysedChunk* pChunkSujet, enChunkType Curpos, int &Step, bool bTitle, bool* pbNewSegment, bool &bIsInList, bool &bNewSegmentOngoing, bool &bIsPredicatAllocated, bool &bMarkDeleted, bool bPivoted, bool &bNounPending, bool &processed, int &iPredicate, std::wstring wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk);
    			static void InitiateProposition( std::list<CAnalysedChunk *>::iterator itChunk, CAnalysedSegment* pSegment, CElementSemantique *pCurrentElement, CElementSemantique *pPreviousElement, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunk, bool* pbNewSegment, bool &bNounPending, bool &bIsInList, bool &bIsPredicatAllocated, bool &bIsPreconditionAllocated , bool &bWasPredicatAllocated, bool &bWasPreconditionAllocated, enChunkType &Curpos, int &iAlloc, int &Step, std::wstring &wsChunk, CAnalysedWord *pWord, CAnalysedChunk *pPreviousChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pNextChunk, CAnalysedChunk *pNext2Chunk);
    			static void ProcessPassiveFromPresentParticiple( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTitle, bool * pbNewSegment, bool &bIsStopped, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static bool ProcessPassiveFromPassive(  std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTtitle, bool * pbNewSegment, bool &bIsStopped, std::list<CAnalysedChunk *>::iterator itChunk, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static void ExecutePassiveAndFormatResult(  std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment * pSegment, std::wstring wsNextUnivers, CAnalysedSegment* pInternalSegment, CElementSemantique *pProposition, CLinguisticSegment* pLinguisticSegment, CLinguisticSegment *pNewLinguisticSegment, CAnalysedChunk* pChunkSujet, int Step, bool bTitle, bool * pbNewSegment, bool &bIsStopped, CAnalysedChunk *pCurrentChunk, CAnalysedChunk *pPreviousChunk);
    			static erc ExtractQPCA( std::list<CAnalysedChunk *>::iterator itChunk, std::list<CAnalysedWord *>::iterator  itWord, CAnalysedSegment* pSegment, std::wstring wsNextUnivers, CAnalysedChunk* pChunkSujet, bool bTitle, bool* pbNewSegment, int iIdDoc);
    	};
    	extern SpecificationLoader::CProposition objProposition;
    };
    #endif /* PROPOSITION_H */

  6. #6
    Expert confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2005
    Messages
    5 493
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Conseil

    Informations forums :
    Inscription : Février 2005
    Messages : 5 493
    Par défaut
    Ok pour les déclarations, mais les définitions et les messages d'erreurs ???

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Utiliser une méthode non-static dans une autre classe?
    Par trexiic dans le forum Débuter avec Java
    Réponses: 6
    Dernier message: 30/09/2015, 18h37
  2. Redéfinir une méthode static dans une classe dérivée
    Par michelp3 dans le forum Général Java
    Réponses: 5
    Dernier message: 06/05/2015, 22h28
  3. variable Static dans une classe
    Par cubitus91 dans le forum Delphi
    Réponses: 3
    Dernier message: 29/11/2006, 00h07
  4. fonction static dans une class
    Par Stany dans le forum C++
    Réponses: 3
    Dernier message: 16/06/2006, 14h43
  5. [C++] Pb avec les variable static dans les classe
    Par quantik-revolution dans le forum C++
    Réponses: 3
    Dernier message: 03/03/2006, 18h40

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo