1

So I have this:

class Component
{
public:
   int label;
   int order;
};

Later in my code I created a 2D array named

Component pixel[][cap]

and initialized its size with user input. Now I am trying to pass it to my function named imageDFS. I tried to use

void imageDFS(Component **)

and

imageDFS(pixel)

but I still receive compiling (codeblocks) errors.

Anthony
  • 21
  • 2
  • [A 2D array cannot be converted to a pointer-to-a-pointer](http://stackoverflow.com/questions/7586702/is-2d-array-a-double-pointer) – user253751 Jan 29 '16 at 00:17
  • You possibly want to make the argument `Component (*namegoeshere)[cap]`. Or `Component namegoeshere[][cap]` if you prefer the array syntax. – user253751 Jan 29 '16 at 00:18
  • I've tried your second suggestion and received the same error. – Anthony Jan 29 '16 at 00:24

0 Answers0