Arrays
The following works for me:
int number[10][7] =
{1,1,1,0,1,1,1
,0,0,1,0,0,1,0
,1,0,1,1,1,0,1
,1,0,1,1,0,1,1
,0,1,1,1,0,1,0
,1,1,0,1,0,1,1
,1,1,0,1,1,1,1
,1,0,1,0,0,1,0
,1,1,1,1,1,1,1
,1,1,1,1,0,1,0};
So, it looks like you can initialize 2-dimension arrays as if it were a 1-dimensional array. I am using MSVC++ 6.0. Maybe this is only available in C++ and not in C? I have no idea. All I know is that it works.
Jason Doucette
http://www.jasondoucette.com/
int number[10][7] =
{1,1,1,0,1,1,1
,0,0,1,0,0,1,0
,1,0,1,1,1,0,1
,1,0,1,1,0,1,1
,0,1,1,1,0,1,0
,1,1,0,1,0,1,1
,1,1,0,1,1,1,1
,1,0,1,0,0,1,0
,1,1,1,1,1,1,1
,1,1,1,1,0,1,0};
So, it looks like you can initialize 2-dimension arrays as if it were a 1-dimensional array. I am using MSVC++ 6.0. Maybe this is only available in C++ and not in C? I have no idea. All I know is that it works.
Jason Doucette
http://www.jasondoucette.com/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement