This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug? cannot copy const array


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]