title: Boolean assigned value of 204 when false
body: <p>I have an object called <code>Symbol</code> which represents a variable. Symbol has the Boolean attribute <code>used</code> which is <code>initialized as false</code>. This condition is changed to true in the event that it is called upon to solve a function to show that it was used. For some reason when <code>Symbol</code> is unused and <code>used</code> is never changed to true it <strong>returns the value 204 instead of false</strong>.</p>
  
  <p>Here is SymbolTable.h where I define a Symbol:</p>
  
  <pre><code>class SymbolTable  {
  public:
      SymbolTable() {}
      void insert(string variable, double value);
      double lookUp(string variable) ;
      bool unusedVar() ;
  private:
      struct Symbol  {
      Symbol(string variable, double value)
      {
          this-&gt;variable = variable;
          this-&gt;value = value;
          bool used = false;//This is my boolean flag
      }
      string variable;
      double value;
      bool used;
  };
  ...
  </code></pre>
  
  <p>Whenever I look up a value from the SymbolTable to plug into a equation I set <code>used</code> to true:</p>
  
  <pre><code>double SymbolTable::lookUp(string variable)  {
      for (int i = 0; i &lt; elements.size(); i++) {
          if (elements[i].variable == variable) {
          elements[i].used = true;//Right here it changes to true
          return elements[i].value;
      }
  ...
  </code></pre>
  
  <p>Later on when I try to detect if any are still false it wont work. And when I print the value of <code>used</code> it prints <strong>204</strong>!</p>
  
  <pre><code>bool SymbolTable::unusedVar() {// returns error if Var is not used
  int count = 0;
  for (int i = 0; i &lt; elements.size(); i++) {
      std::cout &lt;&lt; "Variable: " &lt;&lt; elements[i].variable &lt;&lt; " was " &lt;&lt; elements[i].used &lt;&lt; std::endl;
      if ( !elements[i].used ) {
          std::cout &lt;&lt; "Warning: A variable was not used" &lt;&lt; std::endl;
          return true;
      }
  }
  return false;
  }
  </code></pre>
  
  <p><strong>Why could this be happening?</strong></p>