Y
Yusuf
Hi friends, I'm reading and reading page 128-130 of K&R ANSI edition
and I cannot understand structs. My most simple program gives me the
error
t2.c:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'.' token
I know this is a trivial question to members of this group so could
someone put me on the right track with the syntax. My c program,
compiled with gcc4.1 is below. The error line, line 10, is "
test.testint=1;"
Thank you
Yusuf
struct teststr
{
int testint;
long testlong;
short testshort;
};
struct teststruct test;
test.testint=1;
int main(void)
{
return 0;
}
and I cannot understand structs. My most simple program gives me the
error
t2.c:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'.' token
I know this is a trivial question to members of this group so could
someone put me on the right track with the syntax. My c program,
compiled with gcc4.1 is below. The error line, line 10, is "
test.testint=1;"
Thank you
Yusuf
struct teststr
{
int testint;
long testlong;
short testshort;
};
struct teststruct test;
test.testint=1;
int main(void)
{
return 0;
}