Why STL containers are preferred over MFC containers?

后端 未结 13 1605
时光说笑
时光说笑 2021-01-30 22:24

Previously, I used to use MFC collection classes such CArray and CMap. After a while I switched to STL containers and have been using them for a while.

相关标签:
13条回答
  • 2021-01-30 22:54
    • Compatibility with other libraries (such as boost) in syntax, interoperability, and paradigm. It's a non-trivial benefit.
    • Using STL will develop a skillset that is more likely to be useful in other contexts. MFC isn't so widely used any more; STL is.
    • Using STL will develop a mindset that you may (or may not) find useful in code you write yourself.

    Using something other than STL isn't inherently wrong though.

    0 讨论(0)
提交回复
热议问题