title: C++ how to create folder
body: <p>MY CURRENT CODE</p>
  <pre><code>#include&lt;windows.h&gt;
  #include&lt;fstream&gt;
  #include&lt;direct.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;sys/stat.h&gt;
  #include&lt;filesystem&gt;
  
  int main(){
      int choice;
      std::string folder_n;
  
      std::cin &gt;&gt; choice;
  
      if(choice == 2){
          std::cout &lt;&lt; &quot;Enter folder name&quot; &lt;&lt; std::endl;
          std::cin &gt;&gt; folder_n;
  
          filesystem::create_directory(folder_n);
          std::cout &lt;&lt; &quot;created folder named &quot; &lt;&lt; folder_n &lt;&lt; std::endl ;
              
      }
  
      return 0;
  }
  </code></pre>
  <p>MY PROBLEM --&gt;
  error: 'filesystem' has not been declared
  can anybody tell why is this error coming and how to fix it</p>
  <pre><code>Note : 1. filesystem is included in my c++ version because intellisense is showing filesystem
         2. I am using MinGw 
         3. My MinGW version is 9.2.0```
  </code></pre>