zoukankan      html  css  js  c++  java
  • C++: 组织好include

    头文件分库组织, 先保含通用库, 然后第三方库, 然后本程序的Util之类, 最后具体的类

    代码
    //----------------------------------------------------
    // 平台
    #include <windows.h>  
    //----------------------------------------------------
    // STL
    #include <string>
    #include 
    <vector>
    //----------------------------------------------------
    // 第三方
    #include <boost/foreach.hpp>
    //----------------------------------------------------
    #include <CppTk/Common/Logging/Logging.h>
    #include 
    <CppTk/Common/WindowsFileVersionInfoReader.h>
    //----------------------------------------------------
    // 本程序通用
    #include "Util.h"
    #include 
    "VclUtil.h"
    #include 
    "App.h"
    //----------------------------------------------------
    // 本程序具体
    #include "Student.h"
    #include 
    "Record.h"
    //----------------------------------------------------
  • 相关阅读:
    02 re模块
    24 内置模块re 正则表达式
    pickle 模块
    json模块
    命名元组
    os模块
    24 内置函数 命名元组(namedtuple) ,os ,sys,序列化,pickle,json
    functools
    ccc 音乐播放
    ccc prefab
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1957216.html
Copyright © 2011-2022 走看看