I have a struct like this
struct AUTO{
int weight;
string name;
}
and I have a function that return a struct by passing name
AUTO autoByName(String name, AUTO a[], int ll)
{
for(int i = 0; i < ll; i++)
{
if (name == a[i].name)
{
return a[i];
}
}
// AND HERE ?????
}
but I don't know what return at the end of the function. Is there a null
for struct ?