Click to See Complete Forum and Search --> : C++ programing in mandrake
knavely
11-18-2000, 04:32 AM
Im just a first year com sci student
wondering what the simplest way of programing in mandrake 7.1 is. Im really do simple stuff
i mean we arent using header files, i was using borland...grateful for any help
aph3x
11-18-2000, 04:34 AM
'man gcc'
how do you write a program without header files?
int main(void)
{
return 0;
}
???
knavely
11-18-2000, 03:35 PM
yea pretty much
sincka
11-18-2000, 04:07 PM
1. get vim (editor, i feel that it is the best one http://www.linuxnewbie.org/ubb/smile.gif)
2. when program is written save as whatever.cpp
3. g++ whatever.cpp (to compile) when compiled you should get a.out and then you change it to anything you want.
4. run the program ./a.out or whatever the name...
5 run around in circles screaming like a girl... http://www.linuxnewbie.org/ubb/wink.gif
**note**: gcc is for c g++ is for c++
[This message has been edited by sincka (edited 18 November 2000).]
http://www.linuxnewbie.org/ubb/smile.gif use emacs! http://www.linuxnewbie.org/ubb/smile.gif
Gweedo
11-18-2000, 09:02 PM
Originally posted by sincka:
3. g++ whatever.cpp (to compile) when compiled you should get a.out and then you change it to anything you want.
4. run the program ./a.out or whatever the name...
**note**: gcc is for c g++ is for c++
[This message has been edited by sincka (edited 18 November 2000).]
Instead of above do the following.
3. use this to compile:
g++ file.cpp -o exename
or (which I prefer)
g++ -Wall -g file.cpp -o exename
for example
g++ pigs.cpp -o pigs
or
g++ -Wall -g pigs.cpp -o pigs
Now your executable is not a.out but pigs.
4. to run the program do as above ./exename
example: ./pigs
I personally like CoolEdit:
http://cooledit.sourceforge.net/
Good Luck. http://www.linuxnewbie.org/ubb/wink.gif
------------------
Dubbie..Dubbie..Do..
Watch out.. or the Penguin will get You ;)