title: How to run C++ on sublime text 2 on a mac?
body: <p>I tried to run hello world in C++ on sublime text 2 on my mac.</p>
  
  <p>I typed </p>
  
  <pre><code>#include "iostream"
  
   int main()
   {
     cout&lt;&lt;"Hello WOrld";
     return (0);
   }
  </code></pre>
  
  <p>but it gives me an error</p>
  
  <pre><code>/Users/chiragchaplot/q2.cpp:5:2: error: use of undeclared identifier 'cout'; did you mean 'std::cout'?
          cout&lt;&lt;"Hello World";
          ^~~~
          std::cout
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iostream:50:33: note: 'std::cout' declared here
  extern _LIBCPP_FUNC_VIS ostream cout;
                                  ^
  1 error generated.
  [Finished in 0.4s with exit code 1]
  </code></pre>