1

I was using visual studio for c++ projects for over a period of six months. But time passed and in next semester i had java in course so i installed java package and works like charm with visual code studio.

But i am having problem with c++ now,as it keeps telling me

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\DELL\Desktop\problem 1\a.c).

cannot open source file "bits/stdc++.h"

and it keeps giving a message too

For C source files, IntelliSenseMode was changed from "windows-gcc-x64" to "windows-gcc-x86" based on compiler args and querying compilerPath: "C:\MinGW\bin\gcc.exe"

I could not find anything which i am doing wrong

#include <bits/stdc++.h>
using namespace std;
#define fast   ios_base::sync_with_stdio(false); cin.tie(NULL);
int main()
{
fast
int num,n;
cin>>n;
vector<vector<int>> v;


for(int i=0;i<n;i++)
{
    vector<int> v1;
   for(int j=0;j<n;j++)
    {
        v1.push_back(j+1);
    }
    v.push_back(v1);
}

return 0;
}

and there are all types of error which are generated for not including #include <bits/stdc++.h> but it compiles correctly and also gives results but i don't know why it is showing errors.

Mamta Jha
  • 23
  • 1
  • 5
  • 1
    While this must be very frustrating for you, keep in mind that [it's definitely not a good idea to include ](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h). As for the question at hand, have you maybe tried checking a file called `c_cpp_properties.json` in VSCode? – mediocrevegetable1 Feb 21 '21 at 04:58
  • That ugly `#include ` is GCC-specific. And even the GCC manuals recommend not using it. – Adrian Mole Aug 04 '22 at 12:21

1 Answers1

0

Your compiler is not installed correctly. IT would be helpful if you reinstall your compiler to resolve this error.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 02 '22 at 23:28
  • The compiler is probably installed correctly. The problem is the use of the ugly `#include ` line. – Adrian Mole Aug 04 '22 at 12:20