title: How to use command line arguments to change a bool value
body: <p>I have an assignment where My program is to be able to take one optional command line argument, the -d flag. And if this flag is entered, it is to change my global variable, bool debugMode from 0 to 1. I was told it would be similar to this :</p>
  
  <pre><code>int main (int argc, char** argv)
  </code></pre>
  
  <p>But I don't know how to properly implement it so that when it is ran with -d, it changes the bool from false to true.</p>
  
  <p>My global variable is <code>bool debugMode = 0</code> if that is worth mention.</p>