I know how to assign values to a one-dimensional array.
How do you assign values to a 2 dimensional one ?
for example
cards[9]={1,2,3,4,5,6,7,8,9};
but for 2 dimensional ?
cards[9][2]= ????
I know how to assign values to a one-dimensional array.
How do you assign values to a 2 dimensional one ?
for example
cards[9]={1,2,3,4,5,6,7,8,9};
but for 2 dimensional ?
cards[9][2]= ????
well there are a couple ways:
Both initalize the same locations with the same valuesCode:cards[3][2] = { {0,1}, {2,3}, {4,5}}; cards[3][2] = { 0, 1, 2, 3, 4, 5 };
Thank you so much for this. You were very quick and I appreciate that.
Now back to my program