title: Read access violation when using a pointer as a loop condition
body: <p>I'm attempting to use pointers as conditions for a do...while loop that takes user input in C - but I keep getting a read access violation no matter what I try. I've tried to look everywhere I can for answers but I'm not really understanding well as I am very new to pointers. What am I doing wrong here?</p>
  <pre><code>//Sub prototype
  void GetEmployeeInfo(int* pintEmployeeType);
  
  
  //Actual sub code
  void GetEmployeeInfo(int* pintEmployeeType)
  {   
      //Getting employee type (if the entry is 1 they are a standard employee, while 2 is a manager)
      do
      {
          printf(&quot;Enter employee type ('1' for employee or '2' for manager).\n&quot;);
          scanf(&quot;%d&quot;, &amp;pintEmployeeType);
      } 
      while (*pintEmployeeType != 1 &amp;&amp; *pintEmployeeType != 2); //This is where I'm getting an exception
  </code></pre>