Doubt in 2d - array

I’m getting this same error - https://stackoverflow.com/questions/12990568/passing-2-d-array-as-argument

Please explain me why this error arises and how to work around with 2-d arrays.

Thanks in advance.

Hey @gambhirrahul0 , aap ek brri apna code share krdo. Using ide.codingblocks.com , cause i have to see that how are you initialising array as well as passing array to function.

I’ve dropped you some queries over the chat, let’s continue there.

So please share your code so that I can help you.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

hello @gambhirrahul0
u have reopened the doubt. how i can help u?

Why we have to bound the second dimension while declaring 2-d array? For eg: int x[][5] = {1, 2, 3, 4, 5}. Also, why we’ve to bound it while passing it as a parameter to a function?

first read about row major and coulmn major and then ping me back

Okay, I’ll go through that. Also, I’m very much confused with passing the 2-d array. Like I was trying this question (Flood Fill) https://ide.codingblocks.com/s/475248, & now I’m stuck, I’m not able to pass 2-d array properly. Though we can use vector but will you please help me out with how can I do this with 2-d array? Thanks in advance.

As this problems arises in various other questions like N-Queen etc, it’s better to understand it properly. I request you to please elaborate it & help me out. Thanks again.

pls read this -> link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.