>or classes, yes.
A 2D array of classes is a great deal harder though.
>Is it possible to store this structure in each element of the array?
Yes, though you'll find the syntax has been complicated a bit due to extra levels of membership:
Code:
#include <stdio.h>
struct blah {
int a, b, c;
};
int main ( void )
{
struct blah feh[2][2] = {
{
{1,2,3},
{4,5,6},
},
{
{10,11,12},
{13,14,15},
}
};
int i, j;
for ( i = 0; i < 2; i++ ) {
for ( j = 0; j < 2; j++ )
printf ( "(%d,%d,%d)", feh[i][j].a, feh[i][j].b, feh[i][j].c );
printf ( "\n" );
}
return 0;
}