Results 1 to 3 of 3

Thread: Compiler ...

  1. #1
    A.I. BOT
    Unhappy Compiler ...
    I have a stupid problem. I made a C++ file called test.cpp. It has the fallowing contents:

    #include <cstdlib>
    #include <iostream>
    using namespace std;
    int main() {
       cout << "Hello, World!" << endl;
       return 0;
    Now, I ran
    wiley:~ whammy$ g++ /Users/Whammy/Desktop/test.cpp
    wiley:~ whammy$
    Which I guess it means it worked, due to I see no errors. So I go to my desktop and see no compiled programm. I check my "Whammy" directory and I see a file named a.out which was produced by the compiler, It has a bunch of stuff in it that weird.

    How can I get my compiler to work correctly?? so that it produces a programm rather then a a.out file.


  2. #2
    A.I. BOT
    OMG im stupid >.< ./a.out and it shows my programm i feel stupid now

  3. #3

    rman's Avatar
    Member Since
    Dec 24, 2002
    Los Angeles, California
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    You have forgetten that if you don't given the compiler a file name for the executable, that is will use the default of a.out.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C Compiler
    By girgroupie47 in forum Switcher Hangout
    Replies: 6
    Last Post: 09-20-2009, 11:02 PM
  2. g++ compiler
    By trooper83 in forum macOS - Development and Darwin
    Replies: 3
    Last Post: 05-18-2009, 11:38 AM
  3. C++ Compiler
    By nyzwerewolf in forum macOS - Development and Darwin
    Replies: 4
    Last Post: 09-25-2008, 10:43 PM
  4. C\C++ Compiler
    By belitos in forum macOS - Operating System
    Replies: 6
    Last Post: 05-05-2008, 12:50 PM
  5. De-Compiler
    By Big Beard in forum macOS - Development and Darwin
    Replies: 1
    Last Post: 02-18-2004, 01:17 AM

Posting Permissions

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