title: How to check c++ version in microsoft visual studio 2017
body: <p>I am trying to check the version of c++ i have with the following code.</p>
  
  <pre><code>if (__cplusplus == 201703L) std::cout &lt;&lt; "C++17\n";
          else if (__cplusplus == 201402L) std::cout &lt;&lt; "C++14\n";
          else if (__cplusplus == 201103L) std::cout &lt;&lt; "C++11\n";
          else if (__cplusplus == 199711L) std::cout &lt;&lt; "C++98\n";
          else std::cout &lt;&lt; "pre-standard C++\n";
  </code></pre>
  
  <p>the output is C++98 version , but i am definitely able to use c++11 features so i think i am not getting the correct version from the code.</p>
  
  <p>How can i check which version of c++ i am using ? </p>