How can I avoid syntax errors when creating pointers to members?
Use a typedef. Yea, right, I know: you are different. You are smart. You can do this stuff without a typedef. Sigh. I have received many emails from people who, like you, refused to take the simple advice of this FAQ. They wasted hours and hours of their time, when 10 seconds worth of typedefs would have simplified their lives. Plus, face it, you are not writing code that only you can read; you are hopefully writing your code that others will also be able to read when they’re tired when they have their own deadlines and their own challenges. So why intentionally make life harder on yourself and on others? Be smart: use a typedef.