📁Order模块

搭建储存和操作订单信息的底层数据结构

当前进度

.---+- include -+- tools -+- color.h
    |           |         +- hint.h
    |           |         +- info.h
    |           | 
    |           +- user  -+- user.h
    |           |
    |           +- good  -+- good.h
    |           |
    |           +- order -+- order.h <---
    |           |
    |           +- config.h <---
    |
    +-   src   -+- tools -+- color.c
                |         +- hint.c
                |         +- info.c 
                |
                +- data  -+- id.txt
                |         +- user.txt
                |         +- good.txt 
                |         +- order.txt <---
                |
                +- user  -+- user.c 
                |
                +- good  -+- good.c
                |
                +- order -+- order.c <---
                |
                +- main.c

有了前面两个模块设计的铺垫,这个模块的编写过程也就很顺利了,所以这里不作过多的解释,直接贴代码了。

模块头文件接口设计

模块源文件实现

在config.h中加入约定的最大订单数量:

编写接口的实现模块

最后更新于

这有帮助吗?