samedi 21 novembre 2015

How to check if an integer is equal to a value in an if statement

I want to use getchar to see what the user has pressed and if it's space then it should end the thing by returning 0

int c;
c = getchar();
if (c == " ")
{
    return 0;
}

Aucun commentaire:

Enregistrer un commentaire