zoukankan      html  css  js  c++  java
  • c 框架

    c 数据库框架:
    main.c
    #include <errno.h>
    #include
    <math.h>
    #include
    <stdio.h>
    #include
    <stdlib.h>
    #include
    <string.h>
    #include
    "config.h"

    /*
    * === FUNCTION ======================================================================
    * Name: main
    * Description: main function
    * =====================================================================================
    */

    int
    main (
    int argc, char *argv[] )
    {
    start_CONFIG();
    fuck_A();
    printf (
    "\nProgram %s\n\n", argv[0] );
    free_CONFIG();
    return EXIT_SUCCESS;
    }
    /* ---------- end of function main ---------- */

    a.h
    #ifndef _A_H
    #define _A_H

    typedef
    struct _Stu_A Stu_A;

    #include
    "b.h"

    struct _Stu_A
    {
    char* p_ch_test;
    Stu_B
    * p_stu_B;
    };

    void
    fuck_A ( );

    /*-----------------------------------------------------------------------------
    * \brief 改变G->n_test值
    * \param[in]
    * \param[out] G->n_test
    * \return
    * \free
    *-----------------------------------------------------------------------------
    */

    #endif

    a.c
    #include <stdio.h>
    #include
    "config.h"
    #include
    "a.h"

    extern G_CONFIG* G;

    void
    fuck_A ( )
    {
    printf(
    "%s\n", G->p_ch_test);
    return ;
    }
    /* ----- end of function fuck_a ----- */

    b.h
    #ifndef _B_H
    #define _B_H

    typedef
    struct _Stu_B Stu_B;

    #include
    "a.h"

    struct _Stu_B
    {
    char* p_ch_test;
    Stu_A
    * p_stu_A;
    };

    void
    fuck_B ( );

    #endif

    b.c
    #include <stdio.h>
    #include
    "config.h"
    #include
    "b.h"
    extern G_CONFIG* G;

    void
    fuck_B ( )
    {
    printf(
    "%d", G->n_test);
    return ;
    }
    /* ----- end of function fuck ----- */

    Makefile
    all: main
    main: main.c config.h config.c b.c b.h a.h a.c
    gcc
    -g -Wall -O0 -o main main.c b.c a.c config.c





  • 相关阅读:
    /boot空间不足问题
    推荐系统冷启动问题
    recommendation system
    缺失值处理(前面两种方法偏向于统计学)
    概率密度估计(EM算法,混合朴素贝叶斯模型(朴素贝叶斯模型的无监督学习),因子模型)
    贝叶斯模型
    怎么用fiddler抓APP的包
    java个内部类的总结
    java 类、方法、代码块修饰式关键字总结
    java 字符串笔记
  • 原文地址:https://www.cnblogs.com/wangkangluo1/p/2083474.html
Copyright © 2011-2022 走看看