c++ - How to call member of the Array? -


I am trying to create a function for the array to print 2 columns of 3 columns and 3 lines. Array & lt; Integer, column & gt;, rows & gt

  array  

Ive been trying to figure it out and I go anywhere :( Please do not think i need help

  #included. Use the & lt;. Iostream & gt; #include & lt; array & gt; # & lt; iomanip & gt; using the namespace STD; constants size_t rows = 3; constants size_t column = 3; zero printArray (& Lt; integer, column & gt;, rows & gt; & amp;); integer main () {constant size_t arraysize = 9; arraysize & gt; arraysize & gt; C; & Lt; & lt; "9 Enter an array of floating:" & lt; & lt; endl; (for size_t I = 0; I & lt; c.size (); i ++) {CIN & Gt; & gt; c [i];} & lt; & lt; endl; court & lt; & lt; "General Array print:";: & lt; c; {; & Lt; The item's & lt; & Lt; "2-D array print:" for court of the & lt} (for integer items; integer, column, gt; rows & gt; c [item] of the array; & Lt; & lt; endl;} (for auto construction and line: A) for zero printArray (& lt; integer & lt; integer, column & gt;, rows & gt; & amp; For {Auto Cost and Element: Row} Cot & Lt;    

(Since you already have a date at the print point Ta, I explained the meaning of this question in this form: I do not know how to change the array in order to pass the array)

Except that a sensual Memory is storage and that you are not guaranteed (like a uberhack):

  printre (reinterpret_cast) const arrays and lt; array & lt; int, columns & gt; rows & Gt; & amp; & gt; (C));  

I would feel a lot more secure if you used a conversion loop Which has guaranteed data stability:

  array  

Output:

  Enter an array of 9 integers: Normal array print: 1 2 3 4 5 6 7 8 9 2 -D Array print: 1 2 3 4 5 6 7 8 9  


Comments