Home > Mobile >  <iostream> file can't be found in VS code
<iostream> file can't be found in VS code

Time:04-24

I've just installed the new Version of VS code on my computer and now I constantly get this error that the file cannot be found, whenever i write #include . I should mention that all of the c extentions are still installed. although that i'm a total beginner to c , but i worked with it before and i could run it without problem. I wanted to write a simple hello world code like the following code and i've got the error that the iostream finde could'nt be found.

#include <iostream>
int main()
 {
  std::cout << "Hello World" << std::endl;
}

maybe i should tonfirm the path in Edith Configuration UI but i'm not sure what should i write in path and name Configuration's sections.

CodePudding user response:

From your saying the problem has to be the path configuration of c compiler.

To check whether the compiler is properly configured or not type g in the command prompt(if you are using the g compiler).

enter image description here

If you get the above message, there isn't any problem with your compiler, try checking the extension(.cpp) with which you saved the file.

If you get-

'g  ' is not recognized as an internal or external command, operable program or batch file.

You need to install the compiler. Goto Mingw (g )

CodePudding user response:

#include <iostream>
int main()
 {
  std::cout << "Hello World" << std::endl;
  return 0;
}
  • Related