Thank you for your help, but my problem still hasn't been solved. With those corrections the program compiles and runs, but it doesn't run properly. My program now looks like this:
Code:
#include <stdio.h>
#include <unistd.h>
#include <time.h>
enum on_enable {ENABLE=0, ON=1};
main()
{
int lower_state[5][2];
int n;
char on_state_labels[2][4]={{"ON "},
{"OFF"}};
char enable_state_labels[2][9]={{"ENABLED "},
{"DISABLED"}};
for (n=0; n<5; n++)
{
scanf("%d %d", &lower_state[n][ENABLE], &lower_state[n][ON]);
printf("%s", on_state_labels[lower_state[n][ON]]);
printf("%s\n", enable_state_labels[lower_state[n][ENABLE]]);
}
}
and the output looks like this:
ON ENABLED
ON ENABLED
ON ENABLED
ON ENABLED
ON ENABLED
The problem is that some of those ONs and ENABLEDS should be OFFs and DISABLEDs (I don't know which ones because I can't see the input file). I don't know why they always show up as ON and ENABLED. Thanks again for any help, it's greatly appreciated.