I am trying to use a find_if Boolean function to return true if:
- Z is =<10;
- name="john" (all lower case)
My code:
/* predicate for find_if */
bool exam_pred(const exam_struct &a)
{
if ((a.Z=<10)&&(a.name="john"))
{
return true;
}
}
exam_struct{
int x,y;
double Z;
string name;
};
It doesn't compile when I set a.name="john"
. So my question is how do implement the a.name="john";
into my boolean?