none
un identificateur non trouvé RRS feed

  • Discussion générale

  • bonjour

    J'ai un identificateur déclaré dans le header:

    #ifndef CMorph_H
    #define CMorph_H
    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 CMorph
    	{
    		public:
    		CMorph::CMorph();
    		CMorph::~CMorph();
    	    static int CMorph::morphinit(void);
    		/* Close exception list files and reopen */
    		static int CMorph::re_morphinit();
     		/* Try to find baseform (lemma) of word or collocation in POS. */
    		static char *CMorph::morphstr(char *, int);
    		/* Try to find baseform (lemma) of individual word in POS. */
    		static char *CMorph::morphword(char *, int);
    		static int CMorph::do_init(void);
    		static char* CMorph::strtolower( char *str);
    	private:
    		static char* CMorph::WsCanonWord( int offset, int count, int pos, char* word, char* end);
    		static int CMorph::strend(char *str1, char *str2);
    		static char* CMorph::wordbase(char *word, int ender);
    		static int CMorph::hasprep(char *s, int wdcnt);
    		static char *CMorph::exc_lookup(char *word, int pos);
    		static char *CMorph::morphprep(char *s);
    	};
    };
    #endif 

    il n'est pas reconnu dans le fichier de code:

    char* CMorph::WsCanonWord( int offset, int count, int pos, char* word, char* end)
    {
      int i;
      size_t len;
      size_t len2;
      char retval[WORDBUF];
      char tmpbuf[WORDBUF];
    
        retval[0] = 0;
        tmpbuf[0] = 0;
    	char wordtmp[256];
    	len = strlen( word);
    	strcpy_s( wordtmp, len + 1, word);
    	wordtmp[2] = 0;
        strcpy_s( (char *)Head, 3, (char *)wordtmp);
        if( strcmp( (char *)Head, (char *)"un") == 0)
    	{
    		len = strlen( &word[2]);
    		strcpy_s( tmpbuf, len + 1, &word[2]);
    	}
        else
        {
           Head[0] = 0;
    	   len = strlen( word);
           strcpy_s(tmpbuf, len + 1, word);
        }
        for(i = 0; i < count; i++)
        {
           int cmp;
           int def;
    	   char* word;
    
    	    word = CMorph::worbase(tmpbuf, (i + offset));
    	    len = strlen( word);
    	    strcpy_s(retval, len + 1, word);
    		len2 = strlen( sufx[i + offset]);
            strcpy_s( end, len2 +1, sufx[i + offset]);
            strcpy_s( Canon, len + 1, retval);
    		len += strlen( end);
    		strcat_s(retval, len + 1, end);
            cmp = strcmp( retval, tmpbuf);
            if( cmp == 0)
            {
    			def = is_defined(Canon, pos);
    			if( def != 0)
    			{
    				len = strlen( Head);
    				len += strlen ( Canon);
    				strcat_s( (char *)Head, len + 1, (char *)Canon);
    				return( Head);
    			}
            }
        }
        return(NULL);
    }

    voila le message

    1>          D:\usr\WordNet\src\include\Morph.h(13) : voir la déclaration de 'SpecificationLoader::CMorph'
    


    Jean Noël Martin

    mardi 15 septembre 2015 15:20