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,