ok short and sweet hopefully. suppose you have a struct like so
struct SomeName
{
string id;
}
and you read data from a file into the id then you want to search for a specific id that has a relationship to a name
long findStudent (StudentList list, long count, string student)
{
long n;
//loop for finding a student in list
for(n=0;n<count;n++)
{
temp=list.students[n];
if(temp.id==student)
return n;
}
//return count
return count;
}
i obviously didnt provide all code but can if needed. its a basic search function im just unsure how to search through the struct with the dot operator.