Are the following array declarations valid, if not why?: "i'm confused!"
const int SIZE=4;
void main()
{
int a[SIZE]= {0,2,4,6};
static int b[SIZE]={0,2,4,6,8};
int x[SIZE-5];
int d[SIZE*2];
. . .
. . .
}
Are the following array declarations valid, if not why?: "i'm confused!"
const int SIZE=4;
void main()
{
int a[SIZE]= {0,2,4,6}; ---------------(1)
static int b[SIZE]={0,2,4,6,8};
int x[SIZE-5];
int d[SIZE*2];
. . .
. . .
}
You can re-write the statement (1) as follows:
int a[] = {0,2,4,6};
void main()
{
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.