LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C++ (https://www.linuxquestions.org/questions/linux-newbie-8/c-591661/)

decodedthought 10-14-2007 04:30 AM

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 >>

b0uncer 10-14-2007 05:18 AM

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').


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