Okay hi, I have a problem with the error of
"fatal error C1083: Cannot open include file: 'string': No such file or directory"
^ and in my version it underlined "cout", " #include", and "std" <- from using namespace
and a few weeks ago it would compile just fine, no errors.
The problem is, I sent this to my laptop and it works just fine (same visual studio)
So -- is my visual studio on this computer corrupt and I should redownload all over again or what?
Also I tried doing a simply cout and it wouldn't work like:
1 2 3 4 5 6
#include <iostream>
usingnamespace std;
int main(){
cout<< "Hi"<<endl;
}
1) The install was bad
2) Your STL headers got moved/deleted
3) VS's project settings got screwed up and are looking in the wrong directory for the headers
It probably could be fixed without doing a reinstall, but it might be easier to just trash VS and reinstall it fully. Yeah installation takes a while, but you might end up wasting even more time trying to find/fix the problem. And even if you fix it enough to solve this one problem, maybe you didn't fix everything and something else will pop up later.
Did you create your project the way it should be created? or you just created a new file, put some code and
tried to run ?
As far as I remember VS code does not look like yours, at least the #include <iostream> and the structure of int main() are not the way they look in VS project