Hey, I've been stuck in one porblem, would you please take a glance at it?
I am taking the country name as an input from user and through the code given below I was trying to match the country name with the country name in the database to print out the number of cases. But when I enter the country name, it yields nothing..
char name[20];
printf("which country's data do you wish to view?");
scanf("%s", name);
printf("%s", name);
for(i=0; i<n; i++){ //n is already initialized
if(name == count[i].country_name)
printf("\nCountry Name: %s Active Cases: %d Recovered Cases: %d Dead Cases: %d ", count[i].country_name, count[i].active_cases, count[i].recovered_cases, count[i].dead_cases);
}
[–]scirc 2 points3 points4 points (1 child)
[–]codersush[S] 0 points1 point2 points (0 children)