So i have code where i need to process a string as a yes or no and then return the boolean value in my structure that corresponds with yes or no and im having trouble with it. Any help would be appreciated.
cout<<"Input the first numerator: ";
cin>>f1.num;
cout<<"Input the first denomenator: ";
cin>>f1.denom;
cout<< "Is the fraction positive? (Y or N): ";
cin>>tempchar;
cout<<"Input the second numerator: ";
cin>>f2.num;
cout<<"Input the second denomenator: ";
cin>>f2.denom;
cout<<"Is the fraction positive? (Y or N): ";
cin>>tempchar1;
if(tempchar !)
{
f1.positive;
}
fresult.num=(f1.num*f2.num);
fresult.denom=(f1.denom*f2.denom);