By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,419 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,419 IT Pros & Developers. It's quick & easy.

Arrays as parameters

P: n/a
I see no compilation errors even in C++ 98 compilation mode:

extern void
copy_array2(int dest[4][5], const int src[4][5])
{
// ...
}

extern void
copy_array(int dest[][5], const int src[][5])
{
// ...
}

Shouldnt there be a compile-time error(duplicate declarations)?

Also, what is the type of int dest[][5]?

Dec 10 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Oops! I was too eager in hitting the post message.
I see that the names are different. Sorry about that!

Using the same names, gives me a redefinition error.

Sorry again!

Dec 10 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.