These are ordinary variables, you do not need to do anything special. Therefore, in the title write:
class nmea { protected: static rule<> start, address; };
And in your implementation file:
rule<> nmea::start = ch_p('$'); rule<> nmea::address = ch_p('$');
Although, I think he recommended using member variables.
Daniel James
source share