pass data between Java and C

后端 未结 5 1410
南旧
南旧 2020-12-06 02:51

I have a C structure.

struct data{
    double value1[50];
    double value2[50];
    int count;
};

I want to map data from java to this C

5条回答
  •  不知归路
    2020-12-06 03:48

    Using a standard data container such as CSV is totally appropriate. There's tons of free Java CSV encoding libraries, and the same goes for C.

    Your Java programmer can still use native Java data structures, all he/she needs to do is encode it into CSV (or other formats such as XML) and send it to you.

    On your end all you have to do is read this data container using some CSV library.

提交回复
热议问题