# problem

This topic is 4625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok so picked up this book "the absolute beginer's guide to C" I tried to do what was in the book but there is a problem. I am using Dev C++ So i wrote it just like in the book( the second letter grade should be "a class average" but i doubt its the issue), and I tried to compile and it did and I have the file, but a message says that there is one error. But when I try to debug it says that the file dos not exist when it is right there in the folder.

##### Share on other sites
Your problem is that you're doing #include <studio.h> instead of #include <stdio.h> (no "u").

The Untitled1.exe files does not exist. The file you see is Untitled1.c. Untitled1.exe does not exist because the compile failed (because there was an error). Debugging is used for run-time errors, not compile-time errors.

##### Share on other sites
#include <studio.h>
should be

#include <stdio.h>
.

stdio, not studio.

That'll make it compile and run.

EDIT: Bah, beaten!

##### Share on other sites
You have a compil time error - not a runtime error. For instance, the file studio.h don't exist (read the error message. It contains useful hint about the error itself).

Your code should be corrected to

#include <stdio.h>int main(){  /* your 3 printf statements goes here */  return 0:}

It there is a compil time error, the executable file is not generated, and thus you can't run it (this is the explaination of the second error). A C file is not an executable file, it is a text file that have to be compiled without error to become a exe file.

This kind of information should be in your book introduction. If it is not, then it is not a good book for a beginner.

Another thing: please, don't post screenshot to show a problem. Post code, post the error messages themselves (try to show only the pertinent information) but hell! Images! :)

HTH,

##### Share on other sites
Well I don't know why the compiler doesn't know were the header file is stdio.h
But in dev you can see what directory dev looks trough at tools->compiler options

Regarding the debugger problem...there is no .exe file in your folder, the file you point at is a .c file. You have to compile before a .exe file is made...

Three people before me answering =) I must be slow :D [/edit]

//walle

##### Share on other sites
Oh, and I might add you're using an oldish version of Dev C++ there. There's version 4.9.9.2, available from here.

It's worth considering for when you get to more advanced projects, it never hurts to have the latest version :)

##### Share on other sites
Oh thank you guys.