+ 2
Does anyone know how to loop through a multidimensional array and print its elements in C++?
I need an explanation and an example how that can be done.
10 Answers
+ 6
A double dimension array in c++ is a collection of variable of same data types . A double dimension array can be explained in lay man language as a table of anything that contains rows and columns .
The best example of double dimension array in c++ is a matrix of size r*c where r is the number of rows and c is the number of columns . While you are printing a double dimensional array , you need to use two loops (one for rows and another for column ) .Where there should be a line feed after each row . Ace's code is an example of matrix representation .
+ 4
Ace, why was the parameter of main: void?
+ 3
@Ace, why is the first array empty brackets?
+ 3
Also, can you show me how to use if-else statements instead of the switch statement?
+ 2
Also Ace, could you give me a different example where the arrays contain the elements 0's and 1's and exchange 0 with "+" and 1 with "-"?