title: Error "system" is ambiguous?
body: <p>I have a simple program, and it works fine, but the <code>system("CLS");</code> and <code>system("pause");</code> statements have red IntelliSense lines underneath them. When I move my cursor over them it says <code>Error "system" is ambiguous.</code> What is causing that?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  using namespace std;
  
  int main()
  {
    int choice = 0;
    const double PI = 3.14159;
    double sideSquare = 0.0;
    double radius = 0.0;
    double base = 0.0;
    double height = 0.0;
  
    cout &lt;&lt; "This program calculates areas of 3 different objects." &lt;&lt; endl;
    cout &lt;&lt; "1.) Square" &lt;&lt; endl;
    cout &lt;&lt; "2.) Circle" &lt;&lt; endl;
    cout &lt;&lt; "3.) Right Triangle" &lt;&lt; endl;
    cout &lt;&lt; "4.) Terminate Program" &lt;&lt; endl &lt;&lt; endl;
  
    cout &lt;&lt; "Please [Enter] your object of choice: ";
    cin &gt;&gt; choice;
    system("CLS"); // The problem is here...
  
    switch(choice)
    {
     case 1: 
      cout &lt;&lt; "Please [Enter] the length of the side of the square: ";
      cin &gt;&gt; sideSquare;
      cout &lt;&lt; "The area is: " &lt;&lt; pow(sideSquare, 2) &lt;&lt; endl;
      break;
  
     case 2: 
      cout &lt;&lt; "Please [Enter] the radius of the circle: ";
      cin &gt;&gt; radius;
      cout &lt;&lt; "The area is: " &lt;&lt; PI * pow(radius, 2) &lt;&lt; endl;
      break;
  
      case 3:
      cout &lt;&lt; "Please [Enter] the base of the triangle: ";
      cin &gt;&gt; base;
      cout &lt;&lt; endl &lt;&lt; "Now [Enter] the height of the triangle: ";
      cin &gt;&gt; height;
      cout &lt;&lt; "The area is: " &lt;&lt; (base * height) / 2 &lt;&lt; endl;
      break;
  
    default:
      cout &lt;&lt; "Please [Enter] a valid selection next time." &lt;&lt; endl;
      return 0;
    }
    system("pause"); // ... and here.
    return 0;
  }
  </code></pre>