hi i'm using codeblocks on XP to write a simple program that checks when the header files get called. So i want to print a simple statement such as "enters blah" at the beginning of a header, and this is what i wrote:
Well, since you have your header file resumed here, I can only say that you are missing #define DRIVER_H, but even so, header files are not meant to have full function definitions, only function declarations. It should look like this:
But I'm not sure this is what you want either. I think you want to see a message while you compile, and your message as posted will be shown in runtime and only if the function enterDriver_H() is called at some point.
thx for the reply, but I did include all the proper "def" parts. so you are saying that I cannot print anything from the header files at runtime, since it can only have function declarations? I also don't think th "extern" was necessary in front....
btw I tried the #pragma method and it did work, i could see the note in the build log.