Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ help question
Re: C++ help question [message #380851 is a reply to message #380841] Fri, 17 April 2009 13:09 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
reborn wrote on Fri, 17 April 2009 20:44

If you need to use the function from another .cpp file then add
extern <function here>;

before you use the function.

If you're really struggling, then hit me up on MSN and i'll remote to you.
Would be nice if you considered releasing what you've made. In Love



extern on a function decloration isn't needed.

/*my_script.h*/
void foo();


/*my_script.cpp*/
void foo()
{
   for(int i = 0; i < 10; i++);
}


/*any other file*/
#include "my_script.h"

...

foo();
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Skin Request]
Next Topic: RenX ERROR
Goto Forum:
  


Current Time: Sat Dec 21 06:12:16 MST 2024

Total time taken to generate the page: 0.00924 seconds