You both should ditch that compiler and use Code::Blocks with MinGW instead because they are newer and still actively supported. Dev-C++ has not been updated in quite a few years and uses an older version of gcc/g++ compilers.
It shows error even for simple programs which I had successfully run in turbo c 3.0
Now I've never used turbo c before, but I have used Dev-C++ way back in the days when it was still under development. There are a few things that could explain why things aren't compiling. First, you could have downloaded a version of DevC++ that comes without a compiler, so it's complaining that the compiler is missing. Or you could also be doing something that is specific to Turbo C (non standard code) that won't compile on anything else. I've never used turbo c, but I've heard rumors about it on the net here and there. It's hard to tell exactly because you haven't given us much to work with.
I do agree with Ancient Dragon though. DevC++ hasn't been developed in years and it was abandoned because the authors thought that it was buggy if I remember correctly. Download something else like Code::Blocks and use that instead. You'll at least have a recent IDE and a recent version of Mingw.
Your program compiles just fine in Code::Blocks using the current version of Mingw.
I'm wondering if you have Mingw installed on your computer. Could you double check for us please? There were 2 versions of DevC++, one with a compiler and the other without. You may have the one without the compiler... hence the errors. No way of knowing without reading a few of the errors though or checking your install.
Also, conio.h is not really a part of standard C/C++. Try compiling without that line and see if you have any luck. I'll quote wikipedia on that one: "conio.h is a header file used in old MS-DOS compilers to create text user interfaces. It is not part of the C programming language, the C standard library, ISO C nor is it required by POSIX."
1) iostream.h is obsolete -- use <iostream> instead (without the .h extension. Current c++ standards have removed the .h extension in all its header files.
2) conio.h -- that is a non-standard header file that was originally implemented by Borland compilers such as Turbo C. It was picked up by a few other compilers, but implementations were often not the same. That header file never did become part of the C or C++ standards. You should delete conio.h from your programs unless it contains something you absolutely can not live without. In that case don't complain if other compilers refuse to compile your programs.
Here are the fixes:
1. <iostream.h> changed to <iostream>.
2. missing namespace added the line "using namespace::std;
3. In order to see the output I added the system("PAUSE");
For the gentleman who suggested using another compiler. I totally agree. I use this particular one since many colleges use it when teaching C++ and I like to use the same tool someone is using when they have a problem. Dev-Cpp is free.
programs originally written with turbo c can not be easily ported to other modern compilers due to the differences in the graphics. I suppose you could port all the functions in graphics.h to use win32 api graphics functions, but it might be easier just to rewrite the turbo c program.
because it, along with conio.h, isn't a standard c function. Not very many compilers support it. That's the unfortunate consequences of learning to program on ancient 30-year-old compilers such as Turbo C and Turbo C++. They were good IDEs in their days but have long been obsolete.