Bonjour,
J'ai maintenant un problème de compilation dans un code qui plante à l’exécution:
je suis passé par ce code la première fois sans problème.
je vous met le code, les déclarations du header, et les erreurs:
le code:
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
  switch (TypeOfPreviousWord)
  {
  case CHUNKTYPE_NOUN:
    itPosNoun = std::find( m_ListPosNoun.begin(), m_ListPosNoun.end(), pWord->POS);
    if(itPosNoun != m_ListPosNoun.end())
    {
      IsSameChunkType = true;
    }
    break;
  case CHUNKTYPE_VERB:
    itPosVerb = std::find(m_ListPosVerb.begin(), m_ListPosVerb.end(), pWord->POS);
    if(itPosVerb != m_ListPosVerb.end())
    {
      IsSameChunkType = true;
    }
    break;
  case CHUNKTYPE_FUNCT:
    itPosFunct = std::find(m_ListPosFunct.begin(), m_ListPosFunct.end(), pWord->POS);
    if(itPosFunct != m_ListPosFunct.end())
    {
      IsSameChunkType = true;
    }
    break;
le Header:
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*******************************************************************************
* 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_______________________________________________________*/
	class CChunker
	{
	private:
		std::list<enPOS> m_ListPosVerb;                 //Pos List for verb chunk type
		std::list<enPOS> m_ListPosNoun;                 //Pos List for noun chunk type
		std::list<enPOS> m_ListPostStopper;             //Pos List for poststopper chunk type
		std::list<enPOS> m_ListPreStopper;              //Pos List for prestopper chunk type
		std::list<enPOS> m_ListPosFunct;                //Pos List for function chunk type
		std::list<std::wstring> m_wsListLemmaNonStopper;//Lemma Stopper list
		enum enCChunkerMethod
		{
			SPLIT_INTO_CHUNK =1,
		};
		public:
			CChunker();
			~CChunker();
			static enPOS TestPosType(CAnalysedWord *pWord);
			static erc SplitIntoChunk(CAnalysedSegment *pSegment, std::wstring id);
			//                                                                         1                                                        2                       3                   4            5                6                  7                                                   8
			static CAnalysedChunk* AnalyseCurrentVerbSyntagme( CLinguisticSegment * pLinguisticSegment, std::list<CAnalysedWord*>::iterator& itWord, CAnalysedChunk *pCurrentChunk, int& Step, enPOS& DrivingPos, bool bMarkOngoing, bool bPivotPending, std::list<CAnalysedWord*>::iterator& itEndWord);
			static CAnalysedChunk* AnalyseCurrentNounSyntagme( CLinguisticSegment * pLinguisticSegment, std::list<CAnalysedWord*>::iterator& itWord, CAnalysedChunk* pCurrentChunk, int & Step, enPOS & DrivingPos, bool bMarkOngoing, bool bPivotPending);
			static CAnalysedChunk* InitiateCurrentNounSyntagme( CLinguisticSegment * pLinguisticSegment, std::list<CAnalysedWord*>::iterator& itWord, CAnalysedChunk * pCurrentChunk, int& Step, enPOS& DrivingPos, bool bMarkOngoing, bool bPivotPending);
			static CAnalysedChunk* InitiateCurrentVerbSyntagme( CLinguisticSegment * pLinguisticSegment, std::list<CAnalysedWord*>::iterator& itWord, CAnalysedChunk* pCurrentChunk, int& Step, enPOS& DrivingPos, bool bMarkOngoing, bool bPivotPending);
			static bool IsSameChunkType(enChunkType TypeOfPreviousWord, CAnalysedWord *pWord);
			static enChunkType NewPosType(CAnalysedWord *pWord, CAnalysedWord *pNextWord);
			static CAnalysedWord* SetMark(std::wstring wsMark, enPOS POS, int len);
			void CaseNoun( enPOS Curpos, CAnalysedChunk* pCurrentChunk, CAnalysedWord* pWord, int &Step, enPOS &DivingPos);
	};// end of class
	extern bool m_bOptionProblem;                   //To know if Option Mananger have done his work or not
}; // end of namespace
#endif /* CHUNKER_H */
et les erreurs qui pointent sur les m_ListPosXXXX
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(347): error C2228: la partie gauche de '.begin' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(347): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(348): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(354): error C2228: la partie gauche de '.begin' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(354): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(355): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(361): error C2228: la partie gauche de '.begin' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(361): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
1>..\..\..\..\Linguistic\Analyser\src\chunker.cpp(362): error C2228: la partie gauche de '.end' doit avoir un class/struct/union
qui m'aidera sera