CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Multidimensional Arrays

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
micman
Guest







Multidimensional Arrays
PostPosted: Fri Aug 01, 2003 9:02 am     Reply with quote

I've a problem with multidimensional array es:

int month[12][3] = ("GEN","FEB","MAR","APR",......."DIC");
Comilation problem? Why?

and

int number[3][3]=(1,2,3
4,5,6
7,8,9);
Comilation problem? Why?

Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516553
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: Multidimensional Arrays
PostPosted: Fri Aug 01, 2003 9:27 am     Reply with quote

Use the {} instead of ()

int number[3][3]={1,2,3
4,5,6
7,8,9};

:=I've a problem with multidimensional array es:
:=
:=int month[12][3] = ("GEN","FEB","MAR","APR",......."DIC");
:=Comilation problem? Why?
:=
:=and
:=
:=int number[3][3]=(1,2,3
:= 4,5,6
:= 7,8,9);
:=Comilation problem? Why?
:=
:=Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516554
micman
Guest







Re: Multidimensional Arrays
PostPosted: Fri Aug 01, 2003 9:43 am     Reply with quote

THANKS!!

:=Use the {} instead of ()
:=
:=int number[3][3]={1,2,3
:= 4,5,6
:= 7,8,9};
:=
:=:=I've a problem with multidimensional array es:
:=:=
:=:=int month[12][3] = ("GEN","FEB","MAR","APR",......."DIC");
:=:=Comilation problem? Why?
:=:=
:=:=and
:=:=
:=:=int number[3][3]=(1,2,3
:=:= 4,5,6
:=:= 7,8,9);
:=:=Comilation problem? Why?
:=:=
:=:=Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516555
R.J.Hamlett
Guest







Re: Multidimensional Arrays
PostPosted: Fri Aug 01, 2003 10:48 am     Reply with quote

:=Use the {} instead of ()
:=
:=int number[3][3]={1,2,3
:= 4,5,6
:= 7,8,9};
And here, remember you want three groups of three entries, not one of nine.
Hence:
int number[3][3]={
{1,2,3},
{4,5,6},
{7,8,9}
};

:=:=I've a problem with multidimensional array es:
:=:=
:=:=int month[12][3] = ("GEN","FEB","MAR","APR",......."DIC");
:=:=Comilation problem? Why?
:=:=
:=:=and
:=:=
:=:=int number[3][3]=(1,2,3
:=:= 4,5,6
:=:= 7,8,9);
:=:=Comilation problem? Why?
:=:=
:=:=Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516557
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group