i'm trying to read values from a txt file. the following code works well, but it only print the values to the standard output, i don't know how to store those values in a variable. Thankyou in advance.
char *value = NULL;
double Training[401], Test[50];
int i=0;
size_t line_buf_size = 0;
while(i<4)
{
getline(&value, &line_buf_size, in_file);
fscanf(in_file,"%s%*[^\n]",value);
printf("value %s \n",value);
Training[i]=(double)value; // error : pointer value used where a floating point value was expected
//printf(" training %d i %d \n",Training[i], i);
i++;
}