Hi,
when I try to create a program "Hello world", my compiler says, that I dont have the libray or can't find <iostream>/ <iostream.h>.
I tryed with different compilers, now I am working with pelles but I cant find librares and I dont know how to insert them in the compiler???
Thank you in advance!
There are many hundreds of thousands of IDE's which are simply a graphical text editors.
Not quite as many compilers, more common compilers are GNU/mingw and borland-C.
If you are a windows user you can download mingw, which is the windows version of gnu. borland C (i have never use before). and simply use a basic text editor to start with(like wordpad or download a more advanced editor like notepad++), and use the command prompt to compile and run your programs. Another IDE you can use is DEVC, which I think may also have a compiler with it when you download and install, although I have never used this either.
If you are using linux/bsd/solaris/unix then you can use GNU. gnu.org
if your using MAC, then throw your computer out the window and buy a real pc... :P jokes, seriously though I'm not sure, I would guess GNU, as mac is mostly a ripoff of unix anyway.
when you compile your code using g++ *.cpp the compiler makes an executable usually called a.exe but depends on the compiler and depends on input args you give the compiler. But as an example lets say you write: g++ filename.cpp ( then the compiler will make an a.exe )
at the start of your code your simply write the following
1 2 3 4 5 6 7 8 9
#include <iostream>
usingnamespace std;
int main()
{
... // stuff in main
}
then to run the executable you simply type in cmd window: ./a.exe
also using notepad is bad, download notepad++ it's cool. Or if you don't want to waste bandwith use wordpad.
that's my problem and i am using Pelles compiler but with other copilers,problem is the same!
I think I need libraries but I cant insert them in my compilers!
It's also possible this is just a path error, the compiler you use you might need to set in the windows environment variables, which are in Control Panel -> System -> advanced -> Environment Variables
click PATH then edit, then append NOT DELETE, APPEND to the end of the path line:
;C:\Directory\to\compiler's\bin\directory
But then it shouldn't say can't find the iostream, it should just not work in general if that was the case.
EDIT: and I finally just looked up the Pelles Compiler, which amazingly is an IDE, with small C compiler included in d/l.
C not same as C++
if you download mingw, or preferably cygwin. cygwin contains just about every utility Linux OS's do except they run from within windows much like cmd prompt, but with power.
I havn't used mingw before but from the looks of the download page, a lot of it is borrowed from cygwin anyway. I suggest if you want to learn about linux which is written in C/C++ download cygwin, if you just want an IDE that compiles with a click of the button use DEVCPP.