Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
hey does any one know how to compile and run c,c++ programs in linux.i am confident that the gcc compiler is loaded into my system while i was installing linux.i wanna work out on c..some one help me out plz...
Originally posted by ksd hey every one is being obscure in giving their replies. can you be more clear?i opened the console and
then with in the vi editor,i typed the code and pressed ctrl+alt+z ,came out and then compiled
gcc -o dh.out dhhh.cpp
when i run the above command, i get a n error saying
root@dheeraj:~# gcc -o dh.out dhhh.cpp
gcc: dhhh.cpp: No such file or directory
gcc: no input files
now what do i do ??
what does ctrl-alt-z do in vi? i honestly don't have any idea. the way i learned how to save a file in vi is when you're done editing, press the esc key to get into command mode. then type ":" to enter the command, "wq". there's no quotes around the vi commands. then run the gcc command givent to you by mara.
when you want to run the compiled program use the command:
if you're using the command in the quote.
also, btw, get out of root and use a user account.
hey thanx praveenk for your reply.i have already implemented my first c++ program on my slack..
thanx all....btw i am beginning to feel vi is not a very good editor for newbies..so i will better try out ....
some other editors....emacs.....