#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I'm reading 512 bytes of data from a file. The C structure that wrote the data is of this form:

    struct eu_data {
    float time_data[124];
    int count, bptr, fptr;
    };

    I'm trying to unpack it like this:

    $datarecord = unpack("f124timedata/icount/ibptr/ifptr", $dataline);

    How is "timedata" stored? How do I get at the individual numbers?

    I've looked at many sources for info on this, no dice. Help me! TIA.
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    As far as i know
    only the pointer of time_data is stored..
    and that would be of no use

    if u do (in c code)
    fprintf(fp,&eu_data_item,sizeof(eu_data))

    then i guess u will only store a pointer
    to 124 floats and 3 integers

    ------------------
    Greetings lewi

Similar Threads

  1. Declare string without using array?
    By bnohifi in forum C Programming
    Replies: 3
    Last Post: February 13th, 2004, 04:21 AM
  2. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 10:56 AM
  3. sort: find duplicate string elements in array
    By sciencelife in forum Java Help
    Replies: 3
    Last Post: January 27th, 2004, 01:29 PM
  4. Converting a string to array based on spaces
    By Aaron Scott in forum PHP Development
    Replies: 1
    Last Post: January 21st, 2004, 06:57 PM
  5. array of char to string conversions, how?
    By asciiman in forum C Programming
    Replies: 3
    Last Post: December 15th, 2003, 01:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo