title: get a float number from a void*
body: <p>I'm trying to re-program the printf function (college project) but the %f is causing me problems.
  I use function pointers like so :</p>
  
  <pre><code>void (*fct[15])(void*) =
              {printfs, printfc, printfd, printfd, printfl, printfx, printfX,
               printfo, printfb, printfS, printfu, printfp, printff};
  </code></pre>
  
  <p>when the right flag is used, one of these function is called.
  A typical printfd will recieves a void* variable as parameter and will do so :</p>
  
  <pre><code>int nbr = (int)var;     //var is a void* type variable
  my_put_nbr(var);        //handmade function wich displays numbers
  </code></pre>
  
  <p>The thing is, for some odd reason, when i did the same for printff, it didn't work</p>
  
  <pre><code>float nbr = (float)var;
  </code></pre>
  
  <p>I get the message </p>
  
  <blockquote>
    <p>error: pointer value used where a floating point value was expected
    float nbr = (float)var</p>
  </blockquote>
  
  <p>I also tried to to something like this. If i have</p>
  
  <pre><code>my_printf("%f", var);     //with var = 12.34
  </code></pre>
  
  <p>Then i call the function printff() which should do :</p>
  
  <pre><code>int nbr1 = (int)(var / 1);
  int nbr2 = (int)(var % 1);
  </code></pre>
  
  <p>So i'd have normally nbr1 = 12 and nbr2 = 34 i would then display both with in between a '.' But it still doesn't work and i get the message :  </p>
  
  <blockquote>
    <p>error: invalid operands to binary * (have ‘void *’ and ‘int’) int nbr1
    = (int)(var*1)</p>
  </blockquote>
  
  <p>I'm out of ideer so if you have any clue, tell me.
  Also, i cannot use commands like printf() or something, that's the rule of this exercise so don't tell me the solution hides here.</p>