Some feelings about using STL recently recently

xiaoxiao2021-03-06  120

Recently, STL rewrite a class that handles XML data, the sensation is very efficient, much more simpler than the original MFC, especially some memory processing, before using MFC, you need to handle memory Manage, if you accidentally, then you will have problems, and these things are well processed in STL, using standard containers, and give these tasks to template dealing, greatly reduce workload. In particular, the template of STL is much better than MFC. When using a string mapped table, the STL allows the string to map to any object, and the MFC only has a limited number. If it is a special object, it can only be mapped to the object pointer. Instead, you cannot map it directly to the object, and the handle of the pointer needs to be called himself. It feels too much trouble. There is also the algorithm of the STL standard is also very useful. Although some algorithms are relatively simple, the STL implementation is simpler, most of which are made in a few words. Especially for the design of the iterator, it is really unlikely. Ha ha

转载请注明原文地址:https://www.9cbs.com/read-102316.html

New Post(0)