I have a structure :
typedef struct{
char magicNum[2];
int width;
int height;
int maxGrey;
int pixels[ROW][COLUMN];
} ImageT;
When I try to code this statement:
fscanf(infile, "%c", ImageT.magicNum[0]);
there is an error messege saying:
error: syntax error before 'ImageT'
What's the reason for that? What am I doing wrong here?
thanks.
typedef struct{
char magicNum[2];
int width;
int height;
int maxGrey;
int pixels[ROW][COLUMN];
} ImageT;
When I try to code this statement:
fscanf(infile, "%c", ImageT.magicNum[0]);
there is an error messege saying:
error: syntax error before 'ImageT'
What's the reason for that? What am I doing wrong here?
thanks.
Comment