in reply to transfer float data to c
You probably need to look closely at both the Perl and C side of things to see what's wrong.
Your C data structure may be padded as constructed by the compiler. A C debugger will tell you if it is. The short int is very likely to be padded to four bytes, or else the following float aligned to a four-byte boundary.
Look at the perl side, too. You may find it easier to try importing a known good struct from C into a (binary) perl string and experimenting with its unpack decoding to find and verify the correct format string.
After Compline,
Zaxo
|
|---|