| | |
Including files at run time
![]() |
•
•
•
•
You can not include header file as such during runtime.

•
•
•
•
There are other ways to include code at runtime like load dlls, but to answer your question you cannot include header file as such on the fly.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
You can build static libraries and dynamic libraries and load them in your application. However, it is more platform specific than language specific.
You can use COM and point to right implementation of the function (rather interface).
There are many ways to achieve an objective, You need to select one which suits best to you.
Don't worry; Not only you but no one can include header files during run time
.
Just chuck the purpose; “#include” is a PREPROCESSOR directive. You would like to include header file even before you start compilation.
You can use COM and point to right implementation of the function (rather interface).
There are many ways to achieve an objective, You need to select one which suits best to you.
•
•
•
•
Aw, that makes me feel sad
. Just chuck the purpose; “#include” is a PREPROCESSOR directive. You would like to include header file even before you start compilation.
Last edited by dubeyprateek; Dec 21st, 2007 at 11:01 am.
I know I am. Therefore I am.
•
•
•
•
However, it is more platform specific than language specific.
•
•
•
•
Just chuck the purpose; “#include” is a PREPROCESSOR directive. You would like to include header file even before you start compilation.

•
•
•
•
There are many ways to achieve an objective, You need to select one which suits best to you.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
Use pure virtual functions (run time polymorphism C++).
Or call functions in if else or switch blocks.
You can not surch or enamurate all functions of a executable.
Or call functions in if else or switch blocks.
•
•
•
•
Suppose I want to search for such methods, what keywords should I use?
Last edited by dubeyprateek; Dec 21st, 2007 at 12:43 pm.
I know I am. Therefore I am.
•
•
•
•
You can not surch or enamurate all functions of a executable.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
I think it would help everyone to understand if you would provide some examples. Do you need functions to display information in different languages, such as English, German, French etc.? You create a language DLL for each language you want to support then install the desired language dll when you install the rest of the program. I'm certain you must have seen this before when you try to install something that other people have written.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Actually I've coded a common interface for a two-player fighting (strategy-based) game. Now, The strategy (technically speaking, A.I.) code has to be written by the players in separate files. I thought I'd include those two files at runtime (because there would be many strategy files, each of them numbered) in my main code to start the game.
Thank you all for your replies
.
As this approach won't work, I'd appreciate if you show me some another way of doing the same thing in C.
Thank you all for your replies
.As this approach won't work, I'd appreciate if you show me some another way of doing the same thing in C.
Last edited by Jishnu; Dec 22nd, 2007 at 5:30 am.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
If this is turn-based, the cleanest way to do this is with pipes. Have the AI programs communicate over stdin and stdout, and have the main program fork processes and setup pipes and launch the AI programs with the pipes tied to stdin and stdout. That way (also) you don't have to worry about AI programs going and reading/writing to strange places in memory in an attempt to disrupt the opponent's AI.
![]() |
Similar Threads
- functions in header files (C++)
- General Tips for Mac OS X (Mac tips 'n' tweaks)
- can't run ad-aware se (Viruses, Spyware and other Nasties)
- Modem keeps dialling when i open files (Viruses, Spyware and other Nasties)
- Ok, It's Linux time! (Getting Started and Choosing a Distro)
- XP Boot problems due to virus? (Viruses, Spyware and other Nasties)
- Exchange server 2000 problems (Networking Hardware Configuration)
- Need some help plz; ima newb (not sure how to catagorize this particular prob) (C++)
- Norton WMI Update doesn't work (Viruses, Spyware and other Nasties)
- Browser hijacked - returns every time I Start (Viruses, Spyware and other Nasties)
Other Threads in the C Forum
- Previous Thread: execl() to copy a file /bin/cp
- Next Thread: syntax question
| Thread Tools | Search this Thread |
* ansi api array arrays bash binarysearch calculate centimeter changingto char character convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory dynamic fflush file floatingpointvalidation fork forloop frequency function getlasterror getlogicaldrivestrin givemetehcodez graphics gtkgcurlcompiling gtkwinlinux hardware highest histogram homework i/o ide inches initialization intmain() iso km license linked linkedlist linux linuxsegmentationfault list logical_drives looping loopinsideloop. lowest match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat openwebfoundation pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprogramming stack standard strchr string suggestions test unix urboc user variable whythiscodecausesegmentationfault win32api windows.h windowsapi






