ciara
Marine/Ocean
- May 9, 2003
- 1
Could somebody please help me, it’s all just getting a little to frustrating!!
I was initially working with a long .c file. Within this file I had declared a global char variable of month, with the following syntax…
char month[13][4] = { "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
It worked just fine, declared initialised etc everything knows where to go.
I then fiddled the program to make it modular. Therefore month is declared in the .h file.
When I subsequently try to initialise the array in the main method I just get a syntax error.
I’m trying to initialise it by writing….
month[1][ ] = “Jan”;
month[2][ ] = “Feb”;
etc
Is this completely wrong??
I was initially working with a long .c file. Within this file I had declared a global char variable of month, with the following syntax…
char month[13][4] = { "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
It worked just fine, declared initialised etc everything knows where to go.
I then fiddled the program to make it modular. Therefore month is declared in the .h file.
When I subsequently try to initialise the array in the main method I just get a syntax error.
I’m trying to initialise it by writing….
month[1][ ] = “Jan”;
month[2][ ] = “Feb”;
etc
Is this completely wrong??