syntax errror



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.

.



Relevant Pages

  • Re: syntax errror
    ... > there is an error messege saying: ... You defined a structure type and gave it a typedef name ImageT. ... Prev by Date: ...
    (comp.lang.c)
  • Re: syntax errror
    ... >} ImageT; ... typedef struct ImageT_tag__ { ... Decode email address using b64decode or uudecode -m ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.lang.c)
  • Re: syntax errror
    ... > int height; ... > error: syntax error before 'ImageT' ...
    (comp.lang.c)
  • Re: syntax errror
    ... danu wrote: ... Because ImageT is a type, ... Prev by Date: ...
    (comp.lang.c)
  • Re: syntax errors while building pypgsql
    ... I'm trying to install pypgsql. ... The following excerpt ... PyObject_HEAD /* Here is the syntax error, ...
    (comp.lang.python)