Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » DynamicVectorClass problems
DynamicVectorClass problems [message #453970] Sat, 10 September 2011 13:49 Go to previous message
halo2pac is currently offline  halo2pac
Messages: 659
Registered: December 2006
Location: Near Cleveland, Ohio
Karma:
Colonel
Hey guys,

So I am trying to make a .. of my custom class 'Gamer'

But the compiler keeps erroring at :

engine_vector.h

	virtual int ID(T const &object)
	{
		for (int index = 0; index < Count(); index++)
		{
------------------>>    if ((*this)[index] == object)
			{
				return(index);
			}
		}
		return -1;
	}


my code:
DynamicVectorClass<Gamer> Gamers;

#include "engine_io.h"

class Gamer
{
public:

	//Gamer();
	Gamer(const char *Nick);

	StringClass PlayerName;
	int Deaths;
	int CurrentKills;
};


Gamer::Gamer(const char *Nick)
{
	PlayerName = Nick;
}


I have no idea why this is not working...
any help is appreciated!


http://img339.imageshack.us/img339/1991/nefobbygenyunoreleasere.jpg
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*

[Updated on: Sat, 10 September 2011 13:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Post scripts 4.0 code questions here
Next Topic: LOD models
Goto Forum:
  


Current Time: Fri Dec 13 02:54:23 MST 2024

Total time taken to generate the page: 0.00836 seconds