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?
___________
#include <stdio.h>
int main(void)
{
char scale[12];
float temp;
float temp2;
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