title: Why am I getting "arithmetic of pointer type is required"?
body: <p>In the following code, I get an error when I typecast the float pointer to a struct, but the compiler does not complain if I typecast to something else. Why is it doing this?</p>
  
  <pre><code>typedef unsigned byte CELbool;
  typedef struct {(...)} Color;
  typedef struct {
      (...)
      Color color;
      CELbool b;
  } Light;
  
  Light _light;
  
  void function(float *x) {
      _light.b = (CELbool)*x; // No error
      _light.color = (Color)*x; // (!) Used type 'Color' where arithmetic or pointer type is required
  }
  </code></pre>
  
  <p><strong>Edit</strong>: So say that I have a *x is a pointer to a Color, then what would be the proper way to get that Color? I am currently using <code>Color c = *((Color *)(value))</code>, but I don't think that that is the correct way to do it.</p>