The first failed because you're trying to initialize a 2d array of chars by stuffing more than a single character into an index position.
Code:
char test[5][5] =
{
{ '*', '*', '*', '*', '\0' },
{ ... },
{ ... },
{ ... },
{ ... }
};
The second is being treated as 5 strings capable of holding up to 4 characters + 0 to terminate them... sort of.
cout test[2][2], wants to print a single character; the 3rd character of the 3rd string. to print the lines, use a loop
Code:
for(int i=0; i < 5; ++i)
cout << test[i] << "\n";
To print the lines as you'd like, your declaration should be
Code:
char test[5][6] = { "*****", "*****", "*****", "*****", "*****" };
loop
Using the string class is probably a good idea.