Quote:
|
Originally Posted by Mike
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 =)
|
seems to me you want...
typedef struct{
int blah;
} typedef_example;
void Function (typedef_example data) {
printf("%s \n", data.blah);
}
void main () {
typedef_example data;
data.blah = 1;
Function (data);
}