TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: andrew clarke
date: 2003-08-10 06:38:00
subject: Bob`s questi

Thu 2003-08-07 18:15, Jasen Betts (3:640/1042) wrote to andrew clarke:

 JB>>> Given

 JB>>> typedef struct moo
 JB>>>   {
 JB>>>  int foo;
 JB>>>  char bar;
 JB>>>   } moo;

 JB>>> is   sizeof(moo) * 100   always the same as   sizeof( moo[100] )

 ac>> moo[100] is not valid, but I think you mean:

 JB> My compilers don't complain... are you shure?

6:37 ozzmosis{at}blizzard [~/src]grep -n "" test.c
1:typedef struct moo
2:{
3:    int foo;
4:    char bar;
5:}
6:moo; 
7:
8:moo amoo[100];
9:
10:int amoo_size = sizeof amoo;
11:
12:int moo_size = sizeof moo;

6:37 ozzmosis{at}blizzard [~/src]gcc -Wall -W -c test.c
test.c:12: syntax error before `moo'

-- mail{at}ozzmosis.com

--- timEd/FreeBSD 1.11.b1
* Origin: Blizzard of Ozz, Mt Eliza, Melbourne, Australia (3:633/267)
SEEN-BY: 633/267 270
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.