title: Default value to a parameter while passing by reference in C++
body: <p>Is it possible to give a default value to a parameter of a function while we are passing the parameter by reference. in C++</p>
  
  <p>For example, when I try to declare a function like:</p>
  
  <pre><code>virtual const ULONG Write(ULONG &amp;State = 0, bool sequence = true);
  </code></pre>
  
  <p>When I do this it gives an error:</p>
  
  <blockquote>
    <p>error C2440: 'default argument' : cannot convert from 'const int' to 'unsigned long &amp;'
    A reference that is not to 'const' cannot be bound to a non-lvalue</p>
  </blockquote>