structs error
structs error
Hello, I have a prob.
I can't use structs. That's it.
I type in perfectly good ones, and I get compiler errors.
That's it.
Thank you,
I can't use structs. That's it.
I type in perfectly good ones, and I get compiler errors.
That's it.
Thank you,
Re:structs error
Code: Select all
struct foo
{
int bla;
int blo;
}; /* don't forget the ; */
int main(void)
{
struct foo my_foo;
my_foo.bla = 1;
my_foo.blo = 2;
printf("my_foo.bla = %i\n", my_foo.bla);
printf("my_foo.blo = %i\n", my_foo.blo);
return 0;
}
Re:structs error
still didn't work... as I said, I typed in perfectly good code with gcc ...someverison I think 2.96 ( I think )
Re:structs error
Could show us the code in question, and the error messages that it gives? It would help a lot in putting the problem in context.
Re:structs error
the strangest computer thing that ever happend, suddely it works! and linux is suppose to be stable!!!
Re:structs error
linux is pretty stable. Anyway it doesn't have anything to do with linux but with gcc and/or whatever you're using to compile... I've never heard anything like this before.. which gcc are you using? was your file typed in dos or linux? did you change anything?
Re:structs error
I bet (and am pretty sure) that it was your fault... . It's actually impossible that something doesn't work the first time, and the next time, it does - the only reason is a time conflict, but don't think that's a problem...
It was your fault
It was your fault
Re:structs error
"A novice was trying to fix a broken Lisp machine by turning the power
off and on. Knight, seeing what the student was doing spoke sternly:
'You can not fix a machine by just power-cycling it with no understanding of
what is going wrong'.
Knight turned the machine off and on. The machine worked."
Just a thought from "fortune" that i wanted to share here
off and on. Knight, seeing what the student was doing spoke sternly:
'You can not fix a machine by just power-cycling it with no understanding of
what is going wrong'.
Knight turned the machine off and on. The machine worked."
Just a thought from "fortune" that i wanted to share here