title: Use #define to define an array size
body: <p>I used to capture 5 seconds of data from an ADC which was sending samples at 125 SPS, this translated to having an array of size 5 * 125. In my code this looked like:</p>
  
  <pre><code>#define SPS 125
  #define TIME 5
  
  char Samples[SPS * TIME];
  </code></pre>
  
  <p>Now, I would like to capture 2.5 seconds of data and increase the ADC sampling rate to 250 SPS. In the code it looks like:</p>
  
  <pre><code>#define SPS 250
  #define TIME 2.5
  
  char Samples[SPS * TIME];
  </code></pre>
  
  <p>But if I do this the compiler throws up an error as:</p>
  
  <pre><code>#901 expression must have integral or enum type main.cpp line 59 C/C++ Problem
  </code></pre>
  
  <p>I'm able to understand what it is saying.</p>
  
  <p><strong>But what is the best way to overcome this situation keeping the SPS and TIME definition's usability in mind. I mean I've used them in several other places across the project and I wish to keep using them as they are.</strong></p>
  
  <p>Kindly help!</p>