struct char xlordt[7]={
{x,l,o,r,d,t},
};
when your defining a structure your defining a type you cant initialise a type
Code:
typedef struct{
char name[7];
}XLORDT;
now you declare a variable of type XLORDT
when you refer to a field of your structure you need to use the dot operator
Code:
putc( xlordt.name[x], stdout);
However if you only have 1 field in your structure it's all a waste of time, you may as well just have an array.
Code:
#include <stdio.h>
#include <string.h>
typedef struct{
char name[7];
}XLORDT;
int main( void )
{
int x;
XLORDT xlordt;
strcpy( xlordt.name, "xlordt" );
for (x=0; x<7; x++)
putc( xlordt.name[x], stdout);
return 0;
}