Hi all,
I need to write a function for a program that I am working on. This function takes an int array and a pointer to an array of structures, compares the elements, and writes the matches to another array.
I know that the function would look something like:
Consider that the variables have been declared.
? compare(int Tcard[], people* p)
now should I do 2 for loops
for(i=0; i<numofelem; i++)
{
for(x=0; x<numofleme; x++)
{
if Tcard = people[x].age;
{
/*write to array*/
}
}
}
Any pointers, or help would be appreciated.
I need to write a function for a program that I am working on. This function takes an int array and a pointer to an array of structures, compares the elements, and writes the matches to another array.
I know that the function would look something like:
Consider that the variables have been declared.
? compare(int Tcard[], people* p)
now should I do 2 for loops
for(i=0; i<numofelem; i++)
{
for(x=0; x<numofleme; x++)
{
if Tcard = people[x].age;
{
/*write to array*/
}
}
}
Any pointers, or help would be appreciated.