|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
struct abc
{ int x; char y; }; struct xyz { struct abc p[0]; //LINE 1 int q; }; int a[0]; //LINE 2 Are the declarations in line 1 and line 2 correct? Please . Thank you. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
new <luvraghu@gmail.com> writes:
> struct abc > { > int x; > char y; > }; > > struct xyz > { > struct abc p[0]; //LINE 1 > int q; > }; > > int a[0]; //LINE 2 > > Are the declarations in line 1 and line 2 correct? No. An array must have at least one element. Incidentally, you should always indent your code to reflect its structure. -- Keith Thompson (The_Other_Keith) <kst-u@mib.org> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister" |
|
![]() |
| Outils de la discussion | |
|
|