News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

No such file or directory error

Started by nicholasstoneway, December 01, 2009, 10:22:18 PM

Previous topic - Next topic

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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!