title: pass pointer value to a variable
body: <p>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.</p>
  <pre><code>char *value = NULL;
  double Training[401], Test[50];
  int i=0;
  size_t line_buf_size = 0; 
  while(i&lt;4)
          {
              getline(&amp;value, &amp;line_buf_size, in_file);
              fscanf(in_file,&quot;%s%*[^\n]&quot;,value);
              printf(&quot;value %s \n&quot;,value);
              Training[i]=(double)value; // error : pointer value used where a floating point value was expected
              //printf(&quot; training %d i %d \n&quot;,Training[i], i);
              i++;
          }
  </code></pre>