title: How to word this boolean parameter in a function
body: <p>I am trying to create a treasure map that will show the treasure location at the end of the game. It can't show the treasure map when the user is playing the game. My professor said to use a boolean value to do this; however, I have no clue on how to go about this. The name of my boolean value is ShowTreasure. My code needs to print a star instead of a "T" if the boolean value is false. How should I assign ShowTreasure to be true or false? This is my code:</p>
  
  <pre><code>void PrintMap(bool ShowTreasure)
  {
  
     char map[Y_DIM][X_DIM]= {};
  
  
     for (int row = 0; row &lt; Y_DIM; row++)
     {
        for (int col = 0; col &lt; X_DIM; col++)
        {
           cout &lt;&lt; map[row][col];
           if ((col == TreasureX &amp;&amp; row == TreasureY)) &amp;&amp; ShowTreasure)
                  cout &lt;&lt; "T";
           else 
           cout &lt;&lt; "*";
        }
     cout &lt;&lt; endl;
     }
  }
  </code></pre>