EvilZone

Programming and Scripting => C - C++ => : Pyrod April 10, 2013, 03:57:24 PM

: Need a little bit help with compiling.
: Pyrod April 10, 2013, 03:57:24 PM
hey guys..
I just started to learn c++ and i am totaly new with it.
My problem is i cant compile my cpp file. i get this error in the terminal:
:~/code$ g++ test.cpp
test.cpp:6:22: fatal error: isostream: No such file or directory
compilation terminated.


i even tried to g++ /home/username/code/test.cpp
also get an error.

I use g++ as compiler and i use CodeLite as editor.

Advise about editors and compilers are welcome, like i said i am new :)

thanks..

PyroD

EDIT:
LOL....
#include <iostream> i had spelled this wrong :) so its solved
thanks !!!! and ps advise is welcome

Staff note: y u double post!?
: Re: Need a little bit help with compiling.
: rasenove April 10, 2013, 04:13:34 PM
you should use the modify button insted of double posting.

Also wanted to know where your learning c++ from.
: Re: Need a little bit help with compiling.
: Pyrod April 10, 2013, 04:18:38 PM
Sorry diddn't think of the editing..

i learn it from

http://www.cplusplus.com/doc/tutorial/

i downloaded the pdf..

thanks
: Re: Need a little bit help with compiling.
: pllaybuoy April 10, 2013, 06:50:27 PM
You should get some good book if you are new to programming , because those articles are not too detailed . Try iostream.h instead of iostream and let us know if that works .I advise you to get a good IDE like visual c++
: Re: Need a little bit help with compiling.
: rasenove April 10, 2013, 07:22:15 PM
You should get some good book if you are new to programming , because those articles are not too detailed . Try iostream.h instead of iostream and let us know if that works .I advise you to get a good IDE like visual c++

I agree and disagree,

first i agree that he should get a good learning resource, i suggest he should learn from c++ primer plus 6th edition(its posted on EZ) Its loaded with pure c++ infos, (dont know much about other resources so i wont say anything else)

and second i disagree about choosing IDEs,
Choosing ide is more about the users preference and the the platform he uses, you like Visual c++, i think its just shit.+ memory hog+ totally uncomfortable.
But it may not seem like that to you. I suggest Pyrod to try out some IDE  and decide after that,

i tho, tried a few and think i like netbeans most, code::blocks is good, but doesnt really ring the bell.
: Re: Need a little bit help with compiling.
: Pyrod April 10, 2013, 09:01:49 PM
Thanks for all the information guys..

well i think i want to buy a book. so i will take a look at it next week.
For now i just do some tutorials and experiment with that.
Untill now it works all fine and i even can find my own errors already, and know how to solve them.
 so its going to the good way :P

about the IDE i never heard from it. I dont know what it is. I downloaded CodeLite and i downloaded g++ and i just gonna look at the scripts. try to make them and try to understand the script.

So if IDE is recommended i will take a look at it.


thanks guys
: Re: Need a little bit help with compiling.
: Xires April 10, 2013, 11:37:50 PM
Try CodeBlocks.  It should be in the repositories.  You can also find it on http://www.codeblocks.org/

Also, for future reference, you should probably specify an output filename when using g++ directly:
: (bash)
$ g++ -o executable source.cpp

The above will compile the file 'source.cpp' and output a compiled binary called 'executable'.