I have an if statement in C that is a string comparison and an else statement that is a character comparison. For some reason, it is not working correctly. I am wondering if the condition formats have to match.
if(!strcmp(pitchtomidi[j][0], "do"))
{
printf("This is the string in question %s\n", pitchtomidi[j][0]);
}
else if(pitchtomidi[j][0][0] == '/')
{
printf("This is the character in question %c\n", pitchtomidi[j][0][0]);
}
Thanks, Nakul
Aucun commentaire:
Enregistrer un commentaire