I'm not exactly sure what you are asking. If you have a struct like this:
Code:
typedef struct Data{
char Letter;
int Num;
} DATA;
You can pass the entire stucture to a function:
Code:
int FunctionName(DATA D)
{
//you can access all the variables in the DATA struct
return D.Num;
}
Or you can just pass the char part of the structure:
Code:
void FunctionName(char C)
{
//Do something with C
}
//Later on you would call:
FunctionName(Data.Letter);
This way you only pass the char part of the structure to the function. The function is then set up to only take a char. The other way you can pass the entire struct.
Hope that helps.
- Sean