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 #380548 is a reply to message #380533] Wed, 15 April 2009 18:24 Go to previous messageGo to previous message
Zuess is currently offline  Zuess
Messages: 16
Registered: August 2004
Karma:
Recruit
in the .h file, create the structure.

Then whatever .cpp file you want to use your function in, do an

#include <original_file.h>
/* in gmmain.h */


struct VeteranPlayers {
	std::string PlayerName;
	int VeteranPoints;
};

std::vector<VeteranPlayers> VetInfo;
int VetCheckPoints(int ID);




in your code
#include <gmain.h>

void whateverfunction(int ID)
{
   int points = VetCheckPoints{ID);
   /* DO SOMETHING */

}


Ill double check my syntax when I get home
 
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:28:52 MST 2024

Total time taken to generate the page: 0.00656 seconds