title: Preprocessor arguments and compiling #ifndef #ifdef in C
body: <p>Trying to apply a default value in my code when compiling the file.</p>
  
  <p>I need to set a defined key word to a certain value in my code.</p>
  
  <p>So when I compile the code and it doesn't receive any definition in the arguments of the compiler it will use my default value.</p>
  
  <p>I'm not to sure on how to do this, but I got a little idea:</p>
  
  <pre><code>#ifndef MAXWORKLOAD
  #define MAXWORKLOAD 10
  #endif
  </code></pre>
  
  <p>So if I put this in the code and I use this command line in the argument:</p>
  
  <pre><code>gcc -W -Wall 
  </code></pre>
  
  <p>It will use 10 has default?</p>
  
  <p>And if I use this command line on the compilation: </p>
  
  <pre><code>gcc -W -Wall -DMAXWORKLOAD=5
  </code></pre>
  
  <p>It will use the 5 as its new setting?</p>
  
  <p>I'm not too clear from reading the documentation on this.</p>