hei
May I know how to handle dev cpp;

It shows error even for simple programs which I had successfully run in turbo c 3.0

I also use the same compiler. In order to help you, can you provide sample program that is not working/compiling so folks can help you.

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.

hei
May I know how to handle dev cpp;

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.

#include<iostream.h>
#include<conio.h>
int main()
{
cout<<"Testing...";
return(0);
}
compailor show error even for this code.
Not one and two errors but 324!!!
How it is possible?

Edited 6 Years Ago by niyasc: n/a

Comments
Try posting using code tags, read the intro thread; Try saying what the ACTUAL error messages were. "there are error" is a useless thing to say without context.

What kind of errors are you getting?

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.

Try this version:

#include<iostream>
#include<conio.h>
using namespace::std;
int main()
{
   cout<<"Testing...";
   system("PAUSE");
   return(0);
}

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.

Hope the above helps.

system("pause"); is not the best way to prevent the program from exiting. Using an alternative like cin.get() would be preferred.

Example:

cout << "Paused...\n";
    cin.get();

OK..
That program was successfull
But how can I change complicated programs to dev-ccp
Eg:- The car racing program published in daniweb by me done in turbo c.

Why dev-cpp donot support graphics?

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.

This article has been dead for over six months. Start a new discussion instead.