I'd be cautious of that. While it's sometimes necessary, the problem with such a cast is that it can convert ANY type of array or pointer, whether that is valid or not.
Generally, I treat any...
Type: Posts; User: grumpy
I'd be cautious of that. While it's sometimes necessary, the problem with such a cast is that it can convert ANY type of array or pointer, whether that is valid or not.
Generally, I treat any...
It's an issue with const'ness. A pointer to an array of int is not convertible to a pointer to an array of const int.
Prefix the definitions of array1 and array3 with const (before the int).
...