title: How to draw a rectangle using a char parameter in C++?
body: <p>I want to draw and fill a rectangle using C++. The function parameter passed in must be a char, not an int. In my header file the drawing function is this:</p>
  
  <pre><code>void draw(char);
  </code></pre>
  
  <p>My rectangle.cpp file is this:</p>
  
  <pre><code>void rectangle::draw(char )
  {
      for(height=0;height&lt;=height;height++)
      {
          for(width=1;width&lt;=width;width++)
          {
              cout&lt;&lt;'*';
          }
      }
  }
  </code></pre>
  
  <p>My main.cpp file is this:</p>
  
  <pre><code>rectangle d1;
  d1.draw(char);
  </code></pre>
  
  <p>When I run the program it gives me the error:</p>
  
  <blockquote>
    <p>Expected primary expression before 'char'.</p>
  </blockquote>
  
  <p>I'm using Code::Blocks 13.12. Any ideas to solve this problem?</p>