Hello,
I am trying to pass a multidimensional array to a function but I keep getting a "expected primary-expression before ']' token" error. I'm using Dev-Cpp and here's my code:

int array[*width][*height];
          if(OpenArray(arrayName, width, height, array[][*height]))

I suppose it could be because there is nothing actually stored in the array? Or am I missing something fairly obvious?

Recommended Answers

All 2 Replies

Perhaps its something to do with my OpenArray() definition?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.