Hi iam having trouble with displaying my two dimensional array in columns

|Pie     |Peach   |Socks
|$3.4   |$5        |$9

|Apple |Carrot   etc...
|$6.8   |$2


//for(col = 0; col < COLSIZE; col++)
 for(row = 0; row < ROWSIZE; row++)
      for(col = 0; col < COLSIZE; col++)
      //for(row = 0; row < ROWSIZE; row++)

this loops through the array but i cant seem to get it to display the items in the array like how ppl teach other ppl how it looks like.

i've tried

                cout <<left<< "|" ;
                cout <<item[row][col].Name << endl;

                cout <<left <<"|";
                cout <<item[row][col].Price << endl;

with differenct variations but just dosent work :'(
any advice?


Perhaps other values besides width(0) ?

i have tried other values but it jsut pushes the element further away.
i cant get the element besides each other

use "setiosflags()" and setw() to manipulate the output. dont forget #include <iomanip>
for the decimal you may want to use "setprecision()" hope that helps.