Can I use a character string as a variable to get a program to do one action if a specific word is typed and a different action if another word is typed?
printf("Would you like to convert Fahrentheit or Celsius?\n");
scanf(" %s", scale);/*This works*/
printf("Enter the temperature in %s that you would like to convert:", scale);
scanf(" %f", temp);
if (scale == Fahrenheit)/*This does not work*/
*rest of program follows*
What am I missing in the second instance? Is it even possible to use a string in that manner?
Guideon72 - I will understand sooner or later