Jan 16, 2013 at 11:42am UTC
I have written code for a timer. with everything and i want to include this so i dont need to write or copy the reqd code each time. how do i do this?
Jan 16, 2013 at 11:53am UTC
use the extension .h to define it as a header file
Jan 16, 2013 at 12:00pm UTC
dont forget to #include it in your project
Jan 29, 2013 at 8:32am UTC
What happens if using se the guard? The functions prototype will be there. It won't generate any error but simply increase the compile time overload. Is that it?
Jan 29, 2013 at 9:34am UTC
The guard means that the functions in the header will only be defined once. Redefining a function (ie the compiler sees the prototype or the definition more than once) gives an error. With the header guard, the compiler will only see the prototypes once and then they'll be publicly accessible.
Jan 29, 2013 at 9:41am UTC
first save your code of the timer as xxx.h
then include it as #include "xxx.h" in the program after the default header files inclusion
i believe that this will go well.
Feb 1, 2013 at 9:06am UTC
Where is t defined? Try to design your code to avoid the use of goto
Feb 6, 2013 at 7:20am UTC
well , i defined t and then too it says t is not allowed. yea. i am thinking about it.