I am trying to compile the example codes from the shorts with Doug Lloyd. I was putting together the switch.c example, and there seems to be a problem with the c of switch (c). Here is what I have.
include < cs50.h>
include < stdio.h>
int main(void)
{
switch(c)
{
case 'Y':
case 'y':
printf("yes\n");
break;
case 'N':
case 'n':
printf("no\n");
break;
}
}
The error is error: use of undeclared identifier 'c' and I'm not quite sure what to do about it. I see that I did not declare anything for or about c, but at this point I am not exactly sure how to, as Doug did not do that in his video on conditions. Thanks!