how do you initialize arrays in class/structs and initialize a struct

so say if i had an array in struct


1
2
3
4
5
6
7
8
9
10
struct node
{
node (array [8] [10]):{int num1, int num2, array [num1] [num2]}//this is where im stumped first
int a;
}
how do i initialize the member selector and also how might i initialize the arrays data?

like this? node1.array [10][10] = {23,231,4124,}

if i do that my compiler shouts at me, how do i do this?






My goal would be to put some ascii art in each node, say i stored the alphabet in the form of a 2d array eg;

--cc--
cc--cc
cc----
cc----
cc--cc
--cc--


would be 'c' then my next job would be to have each linked list initialize another array and be able to add other links onto it lie so;





--cc----hh--------ii--
cc--cc--hh--------ii--
cc------hh--------ii--
cc------hhhh------ii--
cc--cc--hh--hh----ii--
--cc----hh--hh----ii--


would be chi, can you give me a hint on how you would go about adding this to another 2d array that would be around [6] [80]

i will suss it all out myself if you could hint on how you plan codes in the first place.
Topic archived. No new replies allowed.