Non-lvalue in assignment?
This program really should take a child name and also output its popularoty position.
The textual content file is presented as
YOU.Jacob Emily
COUPLE OF.David Alyssa
…
…
I cant discover what We are doing drastically wrong.
#include
#include
#include
#include
making use of namespace a sexually transmitted disease;
int main()
char boys100020, girls100020, targetName20, determined;
int matter = 0, boyRank, girlsRank, num;
cout<<"Enter the 1st name that you want to find the \n";
cout<<"popularity associated with from baby names throughout 2004.\n";
cout<<"Be guaranteed to capitalize the 1st letter in the name"<<endl;
cin >> targetName;
ifstream around;
around.open (“babynames2004.txt”);
whenever (in.fail( ))
cout << "Input record opening unsuccessful.\n";
exit(1);
while(count > boyscount >> girlscount)
count++;
to get (int my spouse and i = 0; we < ONE THOUSAND; i++)
if(strcmp(targetName, boysi)==0)
determined = correct;
boyRank = i+1;
if(strcmp(targetName, girlsi)==0)
found=true;
girlsRank = i+1;
if(boyRank! =0 && girlsRank! =0)
cout << targetName <<" is definitely ranked "<< boyRank <<"among boys.\n";
cout << targetName <<" is definitely ranked "<< girlsRank <<"among females.\n";
otherwise if(boyRank! =0 && girlsRank = 0)
cout << targetName <<" is definitely ranked "<< boyRank <<"among boys.\n";
cout << targetName <<" isn't ranked among to LOT OF girl brands.\n";
otherwise if(boyRank = 0 && girlsRank! = 0)
cout << targetName <<" is definitely ranked "<< girlsRank <<"among females.\n";
cout << targetName <<" isn't ranked among to LOT OF boy brands.\n";
come back 0;
Check out and about this collection:
otherwise if(boyRank! =0 && girlsRank = 0)
You probably want a good == generally there, not the =.
Leave a Reply
You must be logged in to post a comment.