bug? cannot copy const array

Neil Booth neil@daikokuya.demon.co.uk
Fri Feb 2 11:41:00 GMT 2001


jdonner wrote:-

> It complains:
> 
> bug.cpp:10: incompatible types in assignment of `const int[3]' to `int[3]'
> 
> Surely this is a bug, since you can copy a const int to an int, no?

I don't believe you can assign one array of anything to another.  You
need to use memcpy.

Neil.


More information about the Gcc-bugs mailing list