Meilleur auteur de réponses
un message d'erreur incompréhensible

Question
-
bonjour
Je suis toujours dans ma migration vers la solution managé
J'ai un code très simple qui provoque un message d'erreur
/*---------------------------------------------------------------*/
/*Name : InitiateCurrentVerbSyntagme */
/*---------------------------------------------------------------*/
/*Role : Create Syntagme according to grammatical */
/* composition of the segment. */
/*Preconditions : Segmentation step already done and segment in */
/*In/Out : itWord, pCurrentChunk, ... */
/*Resource : OPTION MANAGER (OM) */
/*Return : Error code */
/*Constraints : SR44, Optimised, ChunkStruc must contains type */
/* information */
/*Behavior : */
/*---------------------------------------------------------------*/
CAnalysedChunkM^ CChunker::InitiateCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM^ DrivingPos, bool bMarkOngoing, bool bPivotPending)
{ // 0
return( pCurrentChunk);
} // 0
/*---------------------------------------------------------------*/
/*Name : AnalyseCurrentVerbSyntagme */
/*---------------------------------------------------------------*/
/*Role : Create verb syntagme according to grammatical */
/* composition of the segment. */
/*Preconditions : Segmentation step already done and segment in */
/*In/Out : itWord pCurrentChunk,... */
/*Resource : OPTION MANAGER (OM) */
/*Return : Error code */
/*Constraints : SR44, Optimised, ChunkStruc must contains type */
/* information */
/*Behavior : */
/*---------------------------------------------------------------*/
// 1 2 3 4 5 6 7 8
CAnalysedChunkM^ CChunker::AnalyseCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM^ DrivingPos, bool bMarkOngoing, bool bPivotPending)
{ //0
}
CAnalysedWordM^ CChunker::SetMark( System::String^ wsMark, enPOSM POS, int len)
{ // 0
} // 0je vous met les messages d'erreur
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(2138): error C2601: 'SpecificationLoader::CChunker::InitiateCurrentVerbSyntagme' : définitions de fonctions locales non conformes
1> ..\..\..\..\Linguistic\Analyser\src\chunker.cpp(1826) : cette ligne comporte un '{' qui n'est pas équilibré
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(2157): error C2601: 'SpecificationLoader::CChunker::AnalyseCurrentVerbSyntagme' : définitions de fonctions locales non conformes
1> ..\..\..\..\Linguistic\Analyser\src\chunker.cpp(1826) : cette ligne comporte un '{' qui n'est pas équilibré
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(2162): error C2601: 'SpecificationLoader::CChunker::SetMark' : définitions de fonctions locales non conformes
1> ..\..\..\..\Linguistic\Analyser\src\chunker.cpp(1826) : cette ligne comporte un '{' qui n'est pas équilibréet je vous met la déclaration de la classe
/******************************************************************************* * NOM: Chunker.h * ROLE: * HISTORIQUE: * 05/05/2003, yab, initial version *******************************************************************************/ #ifndef CHUNKER_H #define CHUNKER_H /*_____INCLUDE-FILES__________________________________________________________*/ /*_____GLOBAL-DEFINE__________________________________________________________*/ #define OPTION_SECTION_CCHUNKER L"CCHUNKER" #define OPTION_KEYNAME_VERB_FRENCH L"VERB_FRENCH" #define OPTION_KEYNAME_NOUN_FRENCH L"NOUN_FRENCH" #define OPTION_KEYNAME_PRESTOPPER_FRENCH L"PRESTOPPER_FRENCH" #define OPTION_KEYNAME_POSTSTOPPER_FRENCH L"POSTSTOPPER_FRENCH" #define OPTION_KEYNAME_FUNCT_FRENCH L"FUNCT_FRENCH" #define OPTION_KEYNAME_LEMMA_NON_STOPPER_FRENCH L"LEMMA_NON_STOPPER_FRENCH" #define OPTION_KEYNAME_VERB_ENGLISH L"VERB_ENGLISH" #define OPTION_KEYNAME_NOUN_ENGLISH L"NOUN_ENGLISH" #define OPTION_KEYNAME_PRESTOPPER_ENGLISH L"PRESTOPPER_ENGLISH" #define OPTION_KEYNAME_POSTSTOPPER_ENGLISH L"POSTSTOPPER_ENGLISH" #define OPTION_KEYNAME_FUNCT_ENGLISH L"FUNCT_ENGLISH" #define OPTION_KEYNAME_LEMMA_STOPPER_ENGLISH L"LEMMA_STOPPER_ENGLISH" #define OPTION_KEYNAME_VERB_SPANISH L"VERB_SPANISH" #define OPTION_KEYNAME_NOUN_SPANISH L"NOUN_SPANISH" #define OPTION_KEYNAME_PRESTOPPER_SPANISH L"PRESTOPPER_SPANISH" #define OPTION_KEYNAME_POSTSTOPPER_SPANISH L"POSTSTOPPER_SPANISH" #define OPTION_KEYNAME_FUNCT_SPANISH L"FUNCT_SPANISH" #define OPTION_KEYNAME_LEMMA_NON_STOPPER_SPANISH L"LEMMA_NON_STOPPER_SPANISH" #define OPTION_KEYNAME_VERB_ITALIAN L"VERB_ITALIAN" #define OPTION_KEYNAME_NOUN_ITALIAN L"NOUN_ITALIAN" #define OPTION_KEYNAME_PRESTOPPER_ITALIAN L"PRESTOPPER_ITALIAN" #define OPTION_KEYNAME_POSTSTOPPER_ITALIAN L"POSTSTOPPER_ITALIAN" #define OPTION_KEYNAME_FUNCT_ITALIAN L"FUNCT_ITALIAN" #define OPTION_KEYNAME_LEMMA_NON_STOPPER_ITALIAN L"LEMMA_NON_STOPPER_ITALIAN" #define OPTION_KEYNAME_VERB_GERMAN L"VERB_GERMAN" #define OPTION_KEYNAME_NOUN_GERMAN L"NOUN_GERMAN" #define OPTION_KEYNAME_PRESTOPPER_GERMAN L"PRESTOPPER_GERMAN" #define OPTION_KEYNAME_POSTSTOPPER_GERMAN L"POSTSTOPPER_GERMAN" #define OPTION_KEYNAME_FUNCT_GERMAN L"FUNCT_GERMAN" #define OPTION_KEYNAME_LEMMA_NON_STOPPER_GERMAN L"LEMMA_NON_STOPPER_GERMAN" /*_____GLOBAL-TYPES___________________________________________________________*/ /*_____GLOBAL-DATA____________________________________________________________*/ /*_____GLOBAL-MACROS__________________________________________________________*/ /*_____GLOBAL-FUNCTIONS-PROTOTYPES____________________________________________*/ 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; /*_____CLASS-DEFINITION_______________________________________________________*/ enum class enCChunkerMethod { SPLIT_INTO_CHUNK =1, }; ref class CChunker { private: List<enPOSM> m_ListPosVerb; //Pos List for verb chunk type List<enPOSM> m_ListPosNoun; //Pos List for noun chunk type List<enPOSM> m_ListPostStopper; //Pos List for poststopper chunk type List<enPOSM> m_ListPreStopper; //Pos List for prestopper chunk type List<enPOSM> m_ListPosFunct; //Pos List for function chunk type List<System::String^>^ pm_wsListLemmaNonStopper;//Lemma Stopper list public: CChunker::CChunker(); CChunker::~CChunker(); enPOSM^ CChunker::TestPosType( CAnalysedWordM^ pWord); erc CChunker::SplitIntoChunk( CAnalysedSegmentM^ pSegment, System::String^ id); CAnalysedChunkM^ CChunker::AnalyseCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM^ DrivingPos, bool bMarkOngoing, bool bPivotPending, List<CAnalysedWordM^>::Enumerator itEndWord); CAnalysedChunkM^ CChunker::AnalyseCurrentNounSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int & Step, enPOSM& DrivingPos, bool bMarkOngoing, bool bPivotPending); CAnalysedChunkM^ CChunker::InitiateCurrentNounSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM^ DrivingPos, bool bMarkOngoing, bool bPivotPending); CAnalysedChunkM^ CChunker::InitiateCurrentVerbSyntagme( CLinguisticSegmentM^ pLinguisticSegment, List<CAnalysedWordM^>::Enumerator itWord, CAnalysedChunkM^ pCurrentChunk, int& Step, enPOSM^ DrivingPos, bool bMarkOngoing, bool bPivotPending); bool CChunker::IsSameChunkType( enChunkTypeM TypeOfPreviousWord, CAnalysedWordM^ pWord); enChunkTypeM^ CChunker::NewPosType(CAnalysedWordM^ pWord, CAnalysedWordM^ pNextWord); CAnalysedWordM^ CChunker::SetMark( System::String^ wsMark, enPOSM POS, int len); }; }; #endif /* CHUNKER_H */
Jean Noël Martin
- Modifié JeanNoel53 lundi 26 janvier 2015 09:24
Réponses
-
On ne joue pas au petit poucet dans un forum de discutions.
Si, exceptionnellement, vous avez besoin de faire référence à un notre thread de message, merci d'au moins fournir l'Url d'accès ( https://social.msdn.microsoft.com/Forums/fr-FR/3c320e6f-6920-452d-9088-39eaf29c40e0/un-message-derreur-abscons?forum=visualcplusfr )
Ces messages d'erreurs n'ont rien de commun.
Paul Bacelar, Ex - MVP VC++
- Marqué comme réponse JeanNoel53 mercredi 28 janvier 2015 11:35
Toutes les réponses
-
Bonjour,
Pouvez-vous nous montrer quelle ligne de votre code correspond à ligne 6970?
Merci de nous tenir au courant.
Cordialement,
Nina
Microsoft propose ce service gratuitement, dans le but d'aider les utilisateurs et d'élargir les connaissances générales liées aux produits et technologies Microsoft. Ce contenu est fourni "tel quel" et il n'implique aucune responsabilité de la part de Microsoft.
-
C'est la ligne immédiatement qui suit la déclaration de la méthode vide c'est une { ouvrante, comme ci le protoye de la fonction n'était pas déclarée
Jean Noël Martin
- Modifié JeanNoel53 lundi 26 janvier 2015 09:25
-
Révisez comment déclarer les méthodes d'une classe dans un fichier d'en-tête. On n'y remet pas le nom de la classe.
Sinon, je suppute aussi des accolades mal fermées.
Paul Bacelar, Ex - MVP VC++
- Modifié Paul BacelarModerator mardi 27 janvier 2015 02:26
-
-
1° Je n'ai pas dit que c'était le seul problème, mais un long chemin commence par un premier pas. Donc, enlevez-moi cette putain de "redondance" du nom de la classe.
Puis donnez-vous les nouveaux messages d'erreurs.
2° Quel "défauts sur les parenthèses " ? Moi, je suppute des problèmes d'ACCOLADES.
Si cela a réglé vos problèmes d'accolades, c'est très probablement que vous avez mal appareillé vos accolades.
L'ajout de bugs peuvent rendre un code non compilable compilable mais cela ne permet pas de transformer un code bogué en un code moins bogué.
Paul Bacelar, Ex - MVP VC++
-
Bon,j'ai découpé le fichier en deux et j'ai maintenant le message d'erreur contenu dans le thread un message d'erreur abscons
Jean Noël Martin
- Marqué comme réponse JeanNoel53 mardi 27 janvier 2015 17:42
- Non marqué comme réponse Paul BacelarModerator mardi 27 janvier 2015 20:24
-
On ne joue pas au petit poucet dans un forum de discutions.
Si, exceptionnellement, vous avez besoin de faire référence à un notre thread de message, merci d'au moins fournir l'Url d'accès ( https://social.msdn.microsoft.com/Forums/fr-FR/3c320e6f-6920-452d-9088-39eaf29c40e0/un-message-derreur-abscons?forum=visualcplusfr )
Ces messages d'erreurs n'ont rien de commun.
Paul Bacelar, Ex - MVP VC++
- Marqué comme réponse JeanNoel53 mercredi 28 janvier 2015 11:35