Traditional Culture Encyclopedia - Hotel franchise - I want to write a hotel management system program, because there are many modules, and I don't know how to connect them. If there are experts, please give me some advice. Thank you!
I want to write a hotel management system program, because there are many modules, and I don't know how to connect them. If there are experts, please give me some advice. Thank you!
1, each source file is an independent module, which should be compiled independently, without connecting any other modules or other source files.
2. Modules interact with each other through functions, constants, variables, structure definitions and macros (which seem to be a kind of constants).
3. Each module should include two parts: import and export. For example, to call another module's function foo (), you need to
externint foo();
This should belong to the import part of the module.
The function provided by the module should be declared as the export part of the module in the corresponding header file.
The export part of the module should be placed in the header file of the module.
4. If only the variables used in the module are defined as static in the module; Otherwise, it is a global variable, declared in the header file and also used as the export part of the module.
5. Macros can be defined in header files and source files. If the macro is only used in the module, it is equivalent to a local constant and can be placed in the source file; If other modules are used, put them in the header file.
I've thought about this problem, too So far, I haven't found any fixed standards to organize these files. Maybe it's just a habit of programmers, as long as you feel organized. However, if you want to develop a large-scale software, as a member of the development team, you should make your own organizational principles obey everyone's principles.
- Related articles
- How about the exquisite canal Xiangxie Nanyuan? OK or not? Is it worth buying?
- Delicious hotels in Shuangyu, Wenzhou
- Do Americans use mats when driving? Is mat a special feature of China?
- Go to Shenzhen for a self-help tour for three or four days, and ask for the approximate cost and route.
- What is the address of Huarong Cai Wu Today Hotel on Yingbin North Road?
- Can dynamic projection advertising be done?
- What services does the Russian hotel have?
- What happened at the Royal Hotel Bangkok in 1992
- What if I want to go to the hotel kitchen?
- What is Chongqing Yiju Hotel?