Hi,

I have a question about a line in the following code, which is part of the released source code for Quake 2. I'm trying to understand how it works. As I understand it, this is a declaration of the gitem_t struct, which describes objects in the game:

Code:
typedef struct gitem_s
{
	void		(*drop)(struct edict_s *ent, struct gitem_s *item);
	void		(*weaponthink)(struct edict_s *ent);
	char		*pickup_sound;
	char		*world_model;
	int			world_model_flags;
	char		*view_model;
} gitem_t;
Later in the code, the following is part of the code used to test if an item can be dropped:

Code:
	gitem_t		*it;
	if (!it->drop)
What I'm wondering about is this line:

Code:
void	(*drop)(struct edict_s *ent, struct gitem_s *item);
This doesn't look like any variable/ function declaration I've come across/ used before. It's not a function declaration because if I right click it in VS Express, and click goto definition it just stays on the same line. So presumably it's a declaration of a pointer to type "struct edict_s *ent", or "struct gitem_s *item". Does this sound right?

Sorry if this sounds dumb, it just seems a far cry from anything I've seen in my C++ book. Thanks.