Hi
I have a particular problem in returning an element of a struct which matches a maximum of another element
here is part of the code, which will work, but does not display the details.title, which part of my original Struct declaration.
What am I doing wrong ?
int max = 0;
for(int i = 0; i<PROCESSORS; i++)
{
if(details[i].TotalPoint > max)
{
max = details[i].TotalPoint;
}
}
cout<<"\n\n";
cout<<"The Processor selected with " <<max<<" points\n"<< " is "<< details[i].title<< endl;
system ("PAUSE");
return 0;