header files not being included in c++ compiler

dhruv227

New Member
Messages
390
Reaction score
1
Points
0
hey
i downloaded the eclipse c++ compiler and tried creating a program.
like the usual first step, i included header files :

#include<iostream.h>
#include<conio.h>

but it seems that the compiler does not recognize these header files, then i tried with this

#include<iostream>
#include<conio>
using namespace std;

it's still not compiling the program.
what shuld i do now ?
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
"The eclipse C++ compiler"?
Eclipse is only an IDE, it doesn't include a compiler. You'll have to download a compiler somewhere else. And if you're using Windows, perhaps it's a better idea to use Microsoft Visual C++ (Express Edition). The express edition is free and includes both an IDE and a compiler. (And when making Windows programs, it's easier to find support/info for that than for Eclipse.)
 

dhruv227

New Member
Messages
390
Reaction score
1
Points
0
thanks, MS Visual C++ is tooo large. Can you suggest me a good, decent and relatively small compiler for C and C++.

thnx
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
Compilers are never really small (in this modern time), because of all the required files. To be able to compile a program you need the referred header files, builds of every linked executable, program libraries, ... However, you are right. MSVC++ contains a lot more than just a compiler. But note that it's considered to be very good (even by me, and I'm a Linux user) and it contains pretty much everything you need. (IDE, compiler, debugger, ...)
There are a couple of alternatives though. The two main derivatives from gcc are MinGW and Cygwin. Both have their strengths and weaknesses, perhaps you should read the FAQ of both to get an idea.
Another compiler I know of is the Borland compiler. I haven't got any experience with it though, nor do I know much about it.

Also note that there are slight "dialects" in C/C++. Each compiler is a little different, for what I've heard especially Borland is good in that ; )

But as a final piece of advice for this post I'd recommend to use either one of the gcc derivatives if you plan on using Eclipse as IDE. My experience with the actual gcc and Eclipse on Linux is that they integrate quite well.

PS: Eclipse doesn't have C/C++ support by default, you have CDT installed, haven't you?
 
Last edited:
Top