Author Topic: No such file or directory error  (Read 14895 times)

nicholasstoneway

  • Guest
No such file or directory error
« 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!

zabzonk

  • Guest
Re: No such file or directory error
« Reply #1 on: December 01, 2009, 10:38:05 pm »
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)


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: No such file or directory error
« Reply #2 on: December 01, 2009, 10:42:42 pm »
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

nicholasstoneway

  • Guest
Re: No such file or directory error
« Reply #3 on: December 01, 2009, 11:13:39 pm »
Thanks.  It was, in fact, an issue with the type of file I was saving it as.  Saving it as .cpp fixed it.  Thanks!