Find The Error

Oct 10, 2016 at 2:46am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class A
{
   public:
   void Func(const std::string [][8]);
   //Functions
};


class B
{
   std::string Array[8][8];
   public:
   void Func();
   //Functions
};

void B::Func()
{
   A obj;
   obj.Func(Array);
}



There are no syntax errors so what am I doing wrong?
Oct 10, 2016 at 4:09am
How can you expect anyone to answer this question after providing possibly the most terse description of a problem I have ever seen.
Oct 10, 2016 at 4:50am
Because the array when passed into the function in class B turns out to be a one dimension array.
Oct 10, 2016 at 4:53am
When you pass a built in array as a parameter argument you're actually passing a pointer to the first element. How are you trying trying to access it?
Oct 10, 2016 at 5:24am
Array[7][7]

Something like this. Basically I am using a loop to display the data. So it only displays the data of the first row.
Topic archived. No new replies allowed.