Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
does anyone know a link too download C++ compiler?...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    10

    C++ compiler for debian

    does anyone know a link too download C++ compiler?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Execute this
    Code:
    su
    apt-get update
    apt-get install build-essential
    In case your machine doesn't have internet access, you can install compiler from Installation CD/DVD.
    Execute this
    Code:
    apt-cdrom add
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Posts
    10

    c++ in terminal

    how to compile c++ program in the terminal?

  4. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Code:
    g++ -o yourfile.cpp
    This will create an executable named "a.out." If you'd like to name it something else use this command instead:

    Code:
    g++ -o outputFileName yourfile.cpp
    Registered Linux user #270181
    TechieMoe's Tech Rants

  5. #5
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3

    tutorial of gcc

    anyone have a good tutorial of gcc? , i wanna know the funtions of the libraries?

  6. #6
    Just Joined!
    Join Date
    Sep 2007
    Posts
    10

    output of c++ program in terminal

    when i compile the program, the output comes behind like this:
    c++ is powerprogrammacjunior@junior:~$

    "C++ is power program" is the output that is suppose to appear on the screen...
    i am confuse, is it suppose tobe that way or the output should be like:
    "c++ is a power program" only?

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Add newline '\n' at the end to move prompt to next line. Post your code here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #8
    Just Joined!
    Join Date
    Sep 2007
    Posts
    10
    /* this is a simple program */
    #include <iostream>
    using namespace std;

    int main()
    {
    cout << "c++ is power program";
    return 0;
    }

    where should i add a new line?

  9. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Code:
    cout << "\nc++ is power program\n";
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #10
    Linux User
    Join Date
    Jun 2007
    Posts
    458
    gausstanenbaum,

    You can find the functions of the libraries by googling them up. If you want to create programs with GUIs instead of a simple Konsole output program, then you should look into the GUI libraries: GTK and Qt. GNOME is written in GTK, KDE is written in Qt.
    "When you have nothing to say, say nothing."

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •