Re: 'lvalue required as unary ‘&’ operand' Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That explains the compile error, but just fixing that, such as putting the sizeof() expressions in temporary variables, still leaves the bug, just hidden from the compiler.

Those two address of size parameters refer to the filled size of the input buffer and capacity of the output buffer. sizeof(pointer) is just the number of bytes the pointer itself occupies. It says nothing about the usage nor capacity of the buffer pointed to by the pointer.

Brian Budge wrote:
You can't take the address of the sizeof() result.  This is probably a
more appropriate question for a c++ forum, as this is not gcc
specific.

On Wed, Nov 10, 2010 at 9:21 AM, Rifat Mahmud <rftmhmd@xxxxxxxxx> wrote:
 n=iconv(c, &a, &sizeof(a), &d, &sizeof(b));/*The problem is here,



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux