Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: nicholasstoneway on December 01, 2009, 10:22:18 pm
-
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!
-
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)
-
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.
-
Thanks. It was, in fact, an issue with the type of file I was saving it as. Saving it as .cpp fixed it. Thanks!