Click to See Complete Forum and Search --> : Linux and c++
i am learning c++ and use both OS windoze and Redhat. Compiling and running a program iw rote is imple in windows but i don't know how in Linux.
You can code in the standard Emacs or Vi right? But then how do i compile and then run?? You help is greatly appriciated...
By the you could check. www.newbiesplace.com (http://www.newbiesplace.com)
F.o.D
------------------
Strike
12-21-2000, 07:21 PM
okay, once you are done with editing the code, just run
g++ myprogram.cpp
That will produce an executable named a.out in your current directory (so type ./a.out to run). Or you can name the executable by doing:
g++ myprogram.cpp -o myprogram
to name it myprogram (which is then executed by ./myprogram).
Ok thanks alot... I will stick around this board to learn some more... http://www.linuxnewbie.org/ubb/smile.gif
------------------
ndogg
12-22-2000, 12:23 AM
You will definitely want to learn to use vim.
Check out the NHF on it, http://www.linuxnewbie.org/nhf/intel/programming/intro_c++.html .
------------------
Too much Sun can give you cancer. Windows break too easily.
Apples/Macintoshes can rot. BSD... sounds too much like LSD.
Penguins are the only animals sophisticated enough to wear a
tuxedo.
Linux, the only one with the Penguin.
http://ndogg.n3.net