include all files in a directory?

前端 未结 4 1920
别跟我提以往
别跟我提以往 2020-12-09 15:30

How can one achieve what the following code is trying to do?

#include \"dir/*\"
4条回答
  •  不思量自难忘°
    2020-12-09 16:25

    Look at how Boost does this for, say, utility.hpp.

    $ cat /usr/include/boost/utility.hpp
    //  Boost utility.hpp header file  -------------------------------------------//
    
    #ifndef BOOST_UTILITY_HPP
    #define BOOST_UTILITY_HPP
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #endif  // BOOST_UTILITY_HPP
    

    Now you can just use #include .

提交回复
热议问题