LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 10-14-2007, 04:30 AM   #1
decodedthought
Member
 
Registered: Oct 2007
Location: California,USA
Distribution: Archlinux
Posts: 206

Rep: Reputation: 21
C++


i am actually learning c and c++ rite now in college and i am coding in linux ..
how do i compile and run the code ???
help is very much appreciated


THANKS IN ADVANCE >>
 
Old 10-14-2007, 05:18 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
My advice (even though I'm not a master programmer) would be to not learn C and C++ at the same time..I've tried, didn't work out. Learning C first seems more logical.

To compile you run the compiler, for example gcc (Gnu Compiler Collection).
Code:
man gcc
A simple example for a simple C file would be
Code:
gcc code.c
which would produce an executable called 'a.out' if it succeeds; or,
Code:
gcc code.c -o code-executable
to get a 'code-executable' named executable (instead of the default 'a.out').
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration