Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I make a std::vector of function pointers?

I have seen some similar questions but I can’t get this to work.

This fails:

std::vector<void (CChristianLifeMinistryEntry::* pfnSetAssignName)(CString)> = xx;

I want a vector so that I can pre-fill it with a series of &CChristianLifeMinistryEntry::SetXXX functions. This is so that I can quickly determine the right function to use in a for loop I have.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

std::vector<void (CChristianLifeMinistryEntry::*)(CString)> pfnSetAssignName = xx;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading