how do i pass a pointer to the first set of data kinda like...
void sort(struct data *p);
and what does it look like when i pass it....
main()
{
sort(????)
}
my structure looks like this......
struct student{
int stdnum;
char stdname[40];
bool active;
};
struct classes{
int stdnum;
int classnum;
};
struct subject{
int classnum;
char classname[40];
int topic;
};
//----------------------------------fill in some test data
student data[] = {
{1,"Hall Tim",1},
{2,"Harren Chris",1},
{3,"Lyons Steve",1},
{4,"Lakis Mike",1},
{5,"Doe John",1},
{6,"MacMeyer Tim",1},
{7,"Pulli Jon",1}};
classes course[] = {
{1,101},
{2,101},
{1,102},
{3,102}};
subject sub[] = {
{101,"science",111},
{102,"history",222}};
thanks