[Expat-discuss] New questions arised ;)

Norman Rosner jeckyll at mac.com
Sun Aug 27 19:42:14 CEST 2006


Hi Guys it's me again the newbie in expat :)

Now that i have figure out that i can't access member data elemts  
from static function i hope that you guys can help me with answering  
the question:

Is there any way how i can access them?

Heres the code:


struct Wrapper {

public:

     bool LHS_is_on, RHS_is_on, rule_is_on;

   static void  XMLCALL startElement(void *userData, const XML_Char  
*name, const XML_Char **atts)
   {

     if(strcmp(name, "LHS") == 0) {
       LHS_is_on = true;
       RHS_is_on, rule_is_on = false;
       cout << "left" <<"\n";
     }
     //    cout << name << "\n";

   }
...
};

g++ says:

grammar.h:22: error: invalid use of member 'Wrapper::LHS_is_on' in  
static member function
grammar.h:34: error: from this location

So please help me ;)

So i don't have a lot of knowledge about c++ it would be great if  
your answers (hopefully there are any :)) would be as simple as  
possible so i can understand it :)

Thanks a lot

norman


More information about the Expat-discuss mailing list