stdio.h: no such file or directory

so ive searched the web on this for a while and most of the feedback says to make sure it is a c++ file and not a c file. I am using a cpp file, as the file is called "main.cpp" I am still getting the "fatal error: stdio.h: No such file or directory" message when trying to compile.

I've narrowed it down to the #include <fstream> line

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    cout << "Hello\n";
    return 0;
}


I get the same error when running a simple program like this. I am using codeblocks 13.12 btw
Last edited on
Have you tried uninstalling and reinstalling? You may have a misconfigured compiler/IDE.
check settings->compiler(select your compiler from the drop down)->toolchain executables tab->autodetect.

most likely, if it does not find any compiler at all, you downloaded the version with no compiler. Btw, the third one is the one with compiler(MingW).
it worked by reinstalling it thanks!! Glad i could use VS in its place in the meantime
Topic archived. No new replies allowed.