User forums > Using Code::Blocks
No such file or directory error
(1/1)
nicholasstoneway:
Hello...I am a brand new user of c++ (and programming in general). I hope someone will take the time to help me with this noob problem...
I started trying to compile my first program, and I immediately got an error with the first line. It reads, "error: cstdio: No such file or directory".
How do I get the compiler to know where "cstdio" is?
Sorry if this is very basic. Thanks!
zabzonk:
cstdio is a C++ header. Are you perhaps compiling the file that #includes it as a C file? You need to give its name the extension .cpp, not .c (i.e. if it is cirrently called something like main.c it should be called main.cpp)
stahta01:
Turning on Full Compiler Logging helps solving issues like this.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S.
nicholasstoneway:
Thanks. It was, in fact, an issue with the type of file I was saving it as. Saving it as .cpp fixed it. Thanks!
Navigation
[0] Message Index
Go to full version