This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: I need help


Hermione Granger wrote:

> [xxxxx@xxxxxxxxx xxxxx]$ gcc -c test.cpp
> test.cpp: In function `void set_num (long unsigned int *)':
> test.cpp:5: incompatible types in assignment of `long unsigned int *'
> to `long unsigned int[1000]'
> [xxxxx@xxxxxxxxx xxxxx]$
> 
> Please tell me what I am doing wrong.
You are trying to copy a whole book of spells with one stroke of
the assignment wand. As Professor Dumbledore would have already
told you in advanced incantations, that only works when you are
copying into an alterable almanac from a book written in, say,
the language of Tran (particularly the dialect close to the fort).
It is much simpler to copy one page at a time.

Indeed, the newer gcc's have been updated with an explanation
daemon, which tells you,
<geekspeak>
test.cpp:7: ISO C++ forbids assignment of arrays
</geekspeak>

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


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