Some libraries need to be used in procedures

xiaoxiao2021-03-06  115

When writing programs, it is more similar to that most of the programs, and most of the logic is actually relatively simple. Many of them are mainly simple combinations, they can get it. . So some common libraries are critical.

The library is not available, it is useful.

1. Regular expression

As long as you need to parse the string in your program, then this should be a must-have library. After using him, you will find that regular text files are so cute.

2. XML parser and operation library

Data using XML format in the data interaction is a very good choice, flexible data format, easy to expand, and many third-place tool support, etc. We choose its good reason. However, in our procedure, it is actually not needed to use it, as long as it is used to use it. So the XML library we need is not a big library, but a streamlined, easy to use library. So, you use an XML parser you wrote, as well as an operation class of XML data, although many features are not implemented, but usage is already enough. Such implementation is small, 6 files, including header files, but 40KB, if other XML libraries are used, it is on M.

3. Multi-thread processing method

Most programs are needed for multi-threaded processing. In fact, this part does not need to write a library, because the operating system is supported, and the call is also relatively simple.

4. Asynchronous network communication

The current procedures are generally interacting with other programs, and the network connection is essential. Asynchronous communication under Windows is relatively easy to implement, but I use pure C realizes that I still don't find relevant things, I heard that Boost or ACE is there, but that thing is too big, not very interested. (I am very interested in this person.)

5. Common data structure

A) Dynamic array

B) mapping table

C) Dynamic data allocation

D) two-dimensional table control

With these things, I believe that the main framework of a program, and the main part of the main implementation will be relatively easy, and the other part is related to your specific application. That is your own thing.

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

New Post(0)