In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Up to now, most of the C language programs we have written include only one source file, and the code has not been evacuated to multiple modules, which may be accepted by Mini Program, which requires only a few hundred lines, but about large and medium-sized programs with tens of thousands of lines, it is almost a disaster to concentrate all the code in one source file, and subsequent browsing and protection will be called handy results.
In the C language, we can call a .c file a module (Module); the so-called modular development means that a program includes multiple source files (.c files) and header files (.h files).
C language code must be compiled and linked to generate executable programs:
Compilation is for a single source file (.c file). Several source files generate several destination files, and are not affected by other source files in the generation process. In other words, most of the source files are compiled independently.
The influence of the linker is to assemble these target files into an executable program and assign virtual addresses to code (functions) and data (variables, strings, etc.), which is somewhat similar to the process of building blocks.
The reason of compilation is relatively complex, involving a small number of algorithms and regular expressions, the cost of further study is high, and it is not very helpful to the development of modularization, so there is not much focus on this topic.
Learning multi-file programming, the focus is to understand the link process, that is, the linker will decompose multiple independent module groups into an executable file, in this process, there are some rules to abide by, there are some details to attract attention.
Other readers also need to understand the concept of header file, its coding standard and its introduction method.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 203
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.