Help with processing boolean in a structure

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.

my structure is bool positive;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
What are you trying to do on line 14/16?
Topic archived. No new replies allowed.