|
| antmj2317 (4) | |
| is it possible to do something *like* below.. if(userSelection == mathFunctions) #include <math.h> i'm curious if you can add headers at runtime, more or less | |
| Aakanaar (166) | |||||||
| I woudln't know a good work around for this, but for what you are asking, no.. #include is not part of the programming language. It doesn't get turned into executable code in the final program #include is a compiler directive. It tells the compiler at the time of compling the program to insert the code in that header or file into this point of the source code. e.g. If I had a file named myfile.h that looked like this:
then in the main.cpp file i had:
The compiler will at compile time, insert the file into the main.cpp making this:
And then compile it. | |||||||
| dgirdhar (6) | |
| You can't compile the code at run time or include any code at run time. But yeah you can link at run time throught dll's. Load the dll, when it is required. | |
| simo110 (54) | |||
I can't find your purpose! You just need't do it! Using the precomplier command will finish it! But
| |||
This topic is archived - New replies not allowed.
