#include

Posted By: bjarni

#include - 09/19/10 15:46

Hi, I have file splash.c with one funcion call_splash() and a second file main.c and want to call call_splash() from that one..

after 2 hours of trying i could use help with that wink
Posted By: MrGuest

Re: #include - 09/19/10 16:00

make sure they're in the same folder for this example

main.c:
Code:
#include <acknex.h>
#include <default.c>

#include "splash.c" //make sure these are quotes not angular brackets

void main(){
   wait(1);
   call_splash();
}



splash.c:
Code:
function call_splash(){
   beep();
}


Posted By: bjarni

Re: #include - 09/19/10 16:05

this was the trick #include "splash.c"

i tried with this #include <splash.c> for last 2 hours

what is the different?

and MrGuest thanks again.
Posted By: WretchedSid

Re: #include - 09/19/10 16:10

#include <> tries to include the file from the include directory. #include "" tries to include it from the current directory relative to the current file
Posted By: bjarni

Re: #include - 09/19/10 16:24

super.
© 2024 lite-C Forums