compile command ?

This is a discussion on compile command ? within the C++ Programming forums, part of the General Programming Boards category; I am using Linux , and i teached myself C and Java . Now , I want start C++ , ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    7

    compile command ?

    I am using Linux , and i teached myself C and Java . Now , I want start C++ , but I don't know the compile command .for example in C i use cc program.c , and then i run it with a.out, in Java i compile it with javac and run it with java programname.
    How is this in C++,(I bought the book of Stroustrup,but it isnt explained there.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    3

    g++

    You have to install g++. Once that is installed, use the command "g++ -o program program.cpp" without the quotes. You can then execute the program by typing "./program" again, without the quotes.

    fabs

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting MINI-BASIC in MASM over to C++?
    By Paul Panks in forum Projects and Job Recruitment
    Replies: 405
    Last Post: 07-04-2009, 06:41 PM
  2. in program command console
    By howzer in forum C++ Programming
    Replies: 11
    Last Post: 03-19-2006, 03:12 PM
  3. Compiling from the command line
    By Decrypt in forum C++ Programming
    Replies: 17
    Last Post: 09-15-2005, 09:10 PM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 04:30 PM
  5. how do i compile a program that deals w/classes?
    By Shy_girl_311 in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2001, 02:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21