0

i have currently purchased a new laptop and i installed mingw and vs code in it, but when i tried to use the header file #include <bits/stdc++.h> it showed me this error

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\nothe\Desktop\vs code programs\main.cpp).

this is only happening with this particular header file. When I use iostream , vectors etc. it does not shows the error. i did the same installation in my pc and it was working fine. I tried the solutions available on the internet but it is still not working. please help me.

devXm
  • 27
  • 5
  • Can you please specify what you have already tried? – Sandro Massa May 28 '21 at 06:04
  • are you using gcc compiler? – dixit_chandra May 28 '21 at 06:07
  • Also, have you set your MinGW as compiler in the `c_cpp_properties.json`? – Sandro Massa May 28 '21 at 06:08
  • 2
    Does this answer your question? [Why should I not #include ?](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h) – Richard Critten May 28 '21 at 06:16
  • That header is _not_ part of the C++ standard. No compiler is required to provide it and you shouldn't rely on it. And even if it exists you shouldn't use it. After all, you don't want to parse and compile the whole standard library each and every time you compile your code. – Lukas-T May 28 '21 at 06:23
  • @churill yes you are right. to use it i had to create a bits folder in the vs code program files but okay i won;t use it anymore – devXm May 28 '21 at 11:07
  • @RichardCritten i asked why wasn't i able to use it NOT why should i not use it anyways thanks i will not use it anymore – devXm May 28 '21 at 11:08
  • @devXm the point of the duplicate is that the header file may not be present as it is not a Standard header file and is unique to a particular tool-chain. – Richard Critten May 28 '21 at 11:12

0 Answers0