title: C Shell (cpp.sh, browser based compiler) is running a program Visual Studio won't
body: <p>so I am working on a c++ program for a school project. </p>
  
  <p>I used a bunch of conditional operators (I like the shorthand) and it runs just fine on C Shell (this is the link. the program works just fine there... <a href="http://cpp.sh/7fsj" rel="nofollow">http://cpp.sh/7fsj</a> ) but it wont run on Visual Studio C++ and I was curious if there was some sort of error in my code...</p>
  
  <p>my program is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  cout &lt;&lt; "Please enter an angle and I will tell you which quadrant it is in.\n\n\n";
  double angle;
  cin &gt;&gt; angle;
  cout &lt;&lt; endl;
  bool first, second, third, fourth, xaxis, yaxis, nxaxis, nyaxis;
  
  
  if (angle &lt; 0 || angle &gt; 360)
      cout &lt;&lt; "Invalid input.";
  else
  {
  (angle &gt; 0 &amp;&amp; angle &lt; 90 ? first = true : first = false);
  (first == true ? cout &lt;&lt; "The angle you entered is in the first quadrant.\n\n" : cout &lt;&lt; "");
  (angle &gt; 90 &amp;&amp; angle &lt; 180 ? second = true : second = false);
  (second == true ? cout &lt;&lt; "The angle you entered is in the second quadrant.\n\n" : cout &lt;&lt; "");
  (angle &gt; 180 &amp;&amp; angle &lt; 270 ? third = true : third = false);
  (third == true ? cout &lt;&lt; "The angle you entered is in the third quadrant.\n\n" : cout &lt;&lt; "");
  (angle &gt; 270 &amp;&amp; angle &lt; 360 ? fourth = true : fourth = false);
  (fourth == true ? cout &lt;&lt; "The angle you entered is in the fourth quadrant.\n\n" : cout &lt;&lt; "");
  (angle == 0 || angle == 360 ? nxaxis = true : nxaxis = false);
  (angle == 180 ? xaxis = true : xaxis = false);
  (nxaxis == true ? cout &lt;&lt; "This angle lies on the negative portion of the x axis.\n\n" : "");
  (xaxis == true ? cout &lt;&lt; "This angle lies on the positive portion of the x axis.\n\n" : "");
  (angle == 90 ? yaxis = true : yaxis = false);
  (angle == 270 ? nyaxis = true : nyaxis = false);
  (yaxis == true ? cout &lt;&lt; "This angle lies on the positive portion of the y axis.\n\n" : "");
  (nyaxis == true ? cout &lt;&lt; "This angle lies on the negative portion of the y axis.\n\n" : "");
  }
  system("pause");
  return 0;
  }
  </code></pre>
  
  <p>It runs there but not in VS</p>
  
  <p>I can't find any logical errors or reasons for an error but it keeps saying this</p>
  
  <pre><code>"1&gt;------ Build started: Project: lab-projects, Configuration: Debug Win32 ------
  1&gt;  project.cpp
  1&gt;c:\users\wishi\documents\visual studio 2010\projects\lab-projects\lab-projects\project.cpp(179): error C2446: ':' : no conversion from 'const char *' to 'std::basic_ostream&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  1&gt;c:\users\wishi\documents\visual studio 2010\projects\lab-projects\lab-projects\project.cpp(180): error C2446: ':' : no conversion from 'const char *' to 'std::basic_ostream&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  1&gt;c:\users\wishi\documents\visual studio 2010\projects\lab-projects\lab-projects\project.cpp(183): error C2446: ':' : no conversion from 'const char *' to 'std::basic_ostream&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  1&gt;c:\users\wishi\documents\visual studio 2010\projects\lab-projects\lab-projects\project.cpp(184): error C2446: ':' : no conversion from 'const char *' to 'std::basic_ostream&lt;_Elem,_Traits&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;
  1&gt;          ]
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="
  </code></pre>
  
  <p>This is a beginning programming class so I have no idea what this means.
  Can anybody help?</p>