Issues with memcpy

Javier Valencia jvalencia@log01.org
Wed Apr 27 12:43:00 GMT 2005


I'm having some issues with memcpy, i've attached two example files, 
just copying a structure in a char array. The result is different in 
both files, but they do the same.

The output is this:

tigre@enigma collector $ gcc pro.c
tigre@enigma collector $ ./a.out
5 0 0 0 5 0 0 0 5

tigre@enigma collector $ gcc pro2.c
tigre@enigma collector $ ./a.out
5 fffffffa ffffffff ffffffbf 5 0 0 0 5
5 fffffffa ffffffff ffffffbf 5 0 0 0 5

Can someone explain it to me?

Thanks
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pro.c
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050427/980de54b/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pro2.c
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050427/980de54b/attachment-0001.c>


More information about the Gcc-help mailing list