Say I define the following structure globally:
Code:
struct stfirst
{
int num;
char let;
}Me;
then I go ahead and declare it in main as follows:
Code:
stfirst Me[3] = {
{1,'a'},
{2,'b'},
{3,'c'}
};
Is there a way to pass this struct of type first to a function called:
Code:
void show(stfirst);
where the show function will then go through the struct and display the options? I cant seem to make mine work. I dont know what names to put in place of where (ie the function definition,function call from main, and function body)
so does this now mean that I am passing an array of type stfirst to the function, then I should do as if I were just passing an array to the function.. ie
Code:
void show(Me[3])
{
//do comands
}
??
and when I call the function I should use the array name which was Me.