-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
wrote:
> Hi! Anybody there who can answer me on my following code:
>
> When I try to compile this code, I get message of a missing ']' on the
> line 3 i.e. int a[MAX];, why is this happening
>
> Thanks in anticipation.
>
>
> VASUDEV MUKHERJEE
>
>
> #include <stdio.h>
> #define MAX 9;
Think of the implication of the above macro when it is used in the line
below
> int a[MAX];
Because of your #define for MAX, the above line will expand to
int a[9;];
before being parsed
Is this what you intend? Is this legal C? (I know the answers - this is
a hint to you that you should look into the questions a bit)
[snip]
- --
Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFDXiKWagVFX4UWr64RAlvbAKDVhYzgX4bEujnIb7R4FY 4tnGmxtQCfalcR
VdLxzmKhtCWh405pQStf18s=
=8DSt
-----END PGP SIGNATURE-----