My C language program is giving error on the files like
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
#include%26lt;dos.h%26gt;
#include%26lt;graphics.h%26gt;
and all other include files please help. I first thought that there is a mistake in the C programe but later when I brought another disk I found out that its still giving the error if any one knows the answer please do reply. Thank You - Ravi
Problem in c %26amp; c++?
If you are using turboc (TC)
open file ---%26gt; Dos Shell
(Command Prompt will be opened)
See the path and then type exit to close
then on TC go on Options ---%26gt;Directories there specify the path you had seen at dos.
in Include Directories type:-
%26lt;path%26gt;\include
in Libraries Directories type:-
%26lt;path%26gt;\lib
rest leave blank.
click on OK...
Reply:Hi!!
Open C/C++ Editor
Goto
options-%26gt;Directories
make output directory---empty
soucr directories--empty
I think this would solve ur problem.
check out...
Reply:you didn't specify which compiler u r using. also, u didnt specify exactly what are the errors. the include files conio.h, dos.h, graphics.h are not standard header files, so it is not uncommon that ur compiler is giving errors.
also, may be ur file extension is cpp, which is c++ extension. if u r using c++ extension then rename standard header files from stdio.h, stdlib.h, math.h etc to cstdio, cstdlib, cmath etc. that is, remove .h and prefix c.
from ur ide (if u have one) create a new C project and try to compile the following simple C program:
#include %26lt;stdio.h%26gt;
int main()
{
return 0;
}
if it gives errors, try to understand where is the problem.
Reply:u must have changed the directory.. so c++ does not knoe where to look for files..
to correct it.. select file%26gt;%26gt;change dir%26gt;%26gt; and select the directory as turboc.
i hope this will sort out the problem.
if it doesnt probably somethings wrong withur header files.. u might try and reinstall c++ in that case.
Reply:At first u might have saved or installed in let's take it to be c:\ %26amp; then u might have shifted it to someother drive like d:\.
Or u might have changed the folder or something; if u want me to say in Windows explorer language "The file has been either moved, renamed or deleted from the said folder".
You might check these things in directory options.
This may be correct %26amp; upto my knowledge it is correct, eventhough i'm doing my B.Tech in Mechanical, i'm interested to explore these sort of things, may be like trial or error method %26amp; this makes good learning process successful.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment