Would you mix MFC with STL? Why?
Sure. Why not?
I use MFC as the presentation layer, even though the structures and classes in the back-end use STL.
Use STL whenever you can, use MFC when no alternative
I mix them all the time. The only minor PITA was serialization - the MFC containers (CArray
, CList
, CStringArray
, etc.) support CArchive
serialization, but when using STL containers you have to roll your own code. In the end I switched to using boost::serialization
and dumped the MFC CArchive
stuff.
Yes, I have mixed them before without problems. However, after using MFC for over a decade, I would never consider using it for a new project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With