Re: C++
Re: C++
- Subject: Re: C++
- From: Syd Polk <email@hidden>
- Date: Fri, 13 Aug 2004 15:45:14 -0700
On Aug 13, 2004, at 3:28 PM, Syd Polk wrote:
On Aug 13, 2004, at 2:50 PM, digish reshamwala wrote:
Hey..
How do I compile & run simple C++ program in Mac OS X Panther??
The program is:
#include <iostream.h>
int main()
{
cout << "Hello World!" << endl;
return 0;
}
Please reply soon!
The g++ or gcc under terminal doesn't seems to work.
What errors are you getting?
Note that as if a few years ago, you have to either add "using std;"
or change the cout invocation to "std::cout << "Hello, World!" <<
endl;
Oh, and your include is wrong.
Here is the correct version:
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Hello, World!" << endl;
return 0;
}
Syd Polk
Apple Computer
Technology EPM, Mac OS X Development Tools
+1 408 974-0577
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
Syd Polk
Apple Computer
Technology EPM, Mac OS X Development Tools
+1 408 974-0577
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >C++ (From: digish reshamwala <email@hidden>) |
| >Re: C++ (From: Syd Polk <email@hidden>) |