使用CSV或内联阵列传递数组值
我有data
变量,其中我从功能
从其他函数中获取44个数组值..
我想手动将这些值传递到data
varible 。
double features[44];
get_features(ecg_series,csv_data.at(0).size(),features);
union Entry data[44];
float result[4];
char filename[100];
char res[4]={'A','N','O','~'};
int index;
for(int i=0;i<44;i++)
{
data[i].missing=-1;
data[i].fvalue=features[i];
// printf("feature[%d]=%.8f\n",i,features[i]);
}
这是我的代码。
我想
- 直接将数组值传递到
数据
变量。该数组中有44个双重值。 - 或从CSV或其他文件中读取以上44个值。
我该怎么做?
我不熟练C ++,因此无法理解如何做到这一点。
I have data
variable in which I am getting 44 array values from features
from other function..
I want to manually pass these values to data
variable.
double features[44];
get_features(ecg_series,csv_data.at(0).size(),features);
union Entry data[44];
float result[4];
char filename[100];
char res[4]={'A','N','O','~'};
int index;
for(int i=0;i<44;i++)
{
data[i].missing=-1;
data[i].fvalue=features[i];
// printf("feature[%d]=%.8f\n",i,features[i]);
}
This is my code.
I want to do
- Passing array value to
data
variable directly. This array has 44 double values in it. - Or read above 44 values from csv or other file.
How can I do it?
I am not proficient with C++ so could not get understand about how to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论