This seems like fairly basic functionality but, everywhere I look, the answer seems to be no.
Here's the thing: I've got a folder full of files I need to include in a c++ application. They're all named "FileX.h" where X is a number from 1 to 400. I did this because I figured there was a way I could say something like #include "File*.h"
and it would include every file that fits that pattern. The order in which the files are included does not matter. I realize now I probably should have made the files into a shared library or something similar but, for future reference, I'd really like to know if this is possible.
So, is there someway to include all of these files with one #include
statement? Or, failing that, is there a way to include a whole directory worth of files (ie. #include "C:/project/includes/"
) in c++?
Alternatively referred to as a wild character or wildcard character, a wildcard is a symbol used to replace or represent one or more characters. The most common wildcards are the asterisk (*), which represents one or more characters, and question mark (?), which represents a single character.
Wildcards for use with the Access database engines (ANSI-89)Use these wildcard characters in queries created for an Access database. Matches any number of characters. It can be used as the first or last character in the character string.
Sep 14, 2022 175876. The wildcard is an advanced search technique that can be used to maximize your search results in library databases. Wildcards are used in search terms to represent one or more other characters.
AFAIC, the answer is no.
If you are doing this same list of files in multiple places, create another master header file that explicitly includes all the header files and then just include that one master header file in all your source files.
Depending on what you have going, there should be some way to automate the creating of this master header file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With