View Single Post
  #1   Spotlight this post!  
Unread 23-10-2005, 17:18
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Typedef Struct as function input

Is there a way to have typedef struct's as input to a function? EG:

Code:
void Function(typedef struct data)
{
printf("%s \n", data.something);
}

typedef struct{
int blah;
} typedef_example;

typedef_example data;
data.blah = 1;

Function(data);
Thanks =)
__________________
http://www.mikesorrenti.com/