title: Getting a weird pointer error, though not using pointers
body: <p>I've wrote a program that gets a string, and then calculate a total value of the string togheder...
  For Example :</p>
  
  <pre><code>char data[256] = "1$0.83331333333333334$false$false"; // the data
  </code></pre>
  
  <p>Here I need to do the calculation of 1 + 0.83331333333333334
  so this is what I wrote:</p>
  
  <pre><code>char data[256] = "1$0.83331333333333334$false$false"; // the data
  double grade = 0;
  int i = 0;
  int times = 0;
  char temp[256] = "";
  
  int flag = 0;
  
  while (flag == 0)
  {
        times = 0;
  
        if (isdigit(data[i])) // if it's a number
        {
                             if (data[i + 1] == '.') // if it's a double number
                             {
                                        i = i + 2;
                                while (isdigit(data[i])) // putting it into a temp array
                                {
                                    temp[i] = data[i];
                                    i++;
                                    times++;
                                }
                                grade = grade + (double)temp / (times * 10);
                             }
                             grade = grade + (int)data[i]; // if it's an int number, putting it into grade right away
        }
  
        if (data[i] == '\0')
        {
                    flag = 1;
        }
  
        i++;
  }
  
  printf ("%f\n", grade);
  </code></pre>
  
  <p>the problem is in the line :</p>
  
  <pre><code>grade = grade + (double)temp / (times * 10);
  </code></pre>
  
  <p>it says "pointer value used where a floating point value was expected".
  I really couldent understand whats the problem...</p>
  
  <p>Thanks :)</p>
  
  <p>Edit:</p>
  
  <p>Thanks for your help!
  I've been able to convert the number into a string..
  so for example, now if I have the big string in data, with couple of doubles inside it, I can take in a loop every time the double into a new string.
  I've used atof to convert it into a double, though it seems that the double is too small..
  For example :
  I have in the string temp : "83331333333333334", and I used atof on it -> the new double has 8333313 only... the rest is like not going into the double..
  I guess that the number is too big for a double number... so what Can I do ?
  Thanks!</p>