dimanche 9 février 2020

If (choice == choice from other function)

What can I do in a condition if(choice==choice from another fuction)?

void x1()
{
   printf("Player 1\n");
   printf("ENTER NUMBER: ");
   scanf("%d", & cho);
}

void x2()
{
   printf("Player 2\n");
   printf("ENTER NUMBER: ");
   scanf("%d", & cho);

   if(cho==x1(cho)) ---> THE PROBLEM (undeclared(first use in this fuction))
     printf("invalid");
}

Aucun commentaire:

Enregistrer un commentaire