Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal/C++ compiler



George,

try
c++ -g -oHi Hi.cc

in your main file try

#include<iostream> // adding the .h is unnecessary

int main() {
cout << "Hello World!" << endl;
return 0;
}

good luck,
- Mark.

On Thursday, May 2, 2002, at 02:01 PM, George Japaridze wrote:

Hi everyone,

I need help with compiling C++ programs. When I try to compile from the Terminal Hi.cc which is

#include <iostream.h>
int main()
{
cout << "Hello World\n";
return (0);\
}

using
g++ -g -oHi Hi.cc
or c++
or cpp

nothing happens: either I get the message "++: oHi: No such file or directory
Hi.cc:1: iostream.h: No such file or directory", or the cursor freezes.

How should I compile C++ using Terminal?

Thanks,

George Japaridze
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Terminal/C++ compiler (From: George Japaridze <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.