New questions arised ;)

Norman Rosner <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.