Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, 7th_zorro, AndrewAMD), 1,081 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
#include #341704
09/19/10 15:46
09/19/10 15:46
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
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

Re: #include [Re: bjarni] #341706
09/19/10 16:00
09/19/10 16:00
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
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();
}



Re: #include [Re: MrGuest] #341708
09/19/10 16:05
09/19/10 16:05
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
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.

Re: #include [Re: bjarni] #341709
09/19/10 16:10
09/19/10 16:10
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
#include <> tries to include the file from the include directory. #include "" tries to include it from the current directory relative to the current file


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: #include [Re: WretchedSid] #341711
09/19/10 16:24
09/19/10 16:24
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
super.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1