passing struct to function
hey all, is it possible to pass a struct to a function (i'd think so, but i have no idea what I'm doing). what's the syntax? i thought about loading an array and passing that to function, would that be better? thanks :D
Code:
main()
{
s_plyrs unchs1={"t", .9, .2, 9, .9, .333, .100, .5};
s_plyrs unchs2={"r", .6, .05, 4, 1, .220, .500, .5};
s_plyrs unchs3={"a",1,1,1,1,1,1,1};
s_plyrs bob={"b",1,1,1,1,1,1,1};
s_plyrs chuck={"c",1,1,1,1,1,1,1};
s_plyrs dave={"d",1,1,1,1,1,1,1};
s_plyrs ed={"e",1,1,1,1,1,1,1};
s_plyrs fred={"f",1,1,1,1,1,1,1};
s_plyrs guy={"g",1,1,1,1,1,1,1};
//....
void f_show_ps (s_plyrs :confused: )
{
clrscr();
cout<<"Name "<<unchs1<<tab<<endl<<endl;//input goes here
cout<<"fielding"<<tab<<"batting"<<endl;
cout<<"speed"<<tab<<tab<<"pitching"<<endl;
cout<<"throwing"<<tab<<"Luck"<<endl;
}