title: How to make sure code (c++) written in Xcode can compile on other platforms?
body: <p>I am a beginner was trying to do some C++ programming on Xcode. It works fine, but when I try to compile the same c++ file on my windows pc using VS, there were some errors. After I look at my code closely, there are really some stupid mistakes that I have made which caused the errors, but Xcode seemed to have ignored them...</p>
  
  <p>My question is that is there any setting that I need to change to prevent Xcode from being so smart?</p>
  
  <p>For example, the following code can actually compile in xcode:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
  
      if (true or false){
          cout &lt;&lt; "How is this possible? \n";
      }
      return 0;
  }
  </code></pre>
  
  <p>There are also other cases where the code is actually wrong, but it can compile just fine is Xcode which is the annoying part and I want to disable that.</p>