title: error: ld returned 1 exit status I Build failed: 2 errors
body: <p>This might be an obvious mistake of mine but for the life of me I can't figure out why I am getting this error. There is no indication of where the error's source is.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
      while(true)
      {
          int hrs;
          cout &lt;&lt; "Enter hours worked (-1 to end):";
          cin &gt;&gt; hrs;
          if (hrs == -1)
          {
              break;
          }
          double rate;
          cout &lt;&lt; "Enter hourly rate of the employee ($00.00):";
          cin &gt;&gt; rate;
          double salary = 0.00;
          if (hrs &lt;= 40)
          {
              salary = rate * hrs;
          }
          else
          {
              int otrate = rate * 1.5;
              salary = otrate * hrs;
          }
          cout &lt;&lt; "Salary is $" &lt;&lt; salary &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>Error message</p>
  
  <pre><code>||=== Build: Debug in AssignmentTwoQuestionOne (compiler: GNU GCC Compiler) ===| ld.exe
  ||  cannot open output file bin\Debug\AssignmentTwoQuestionOne.exe Permission denied| 
  ||  error: ld returned 1 exit status| 
  ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===| –
  </code></pre>