 |
 |
C++
|
 |
|
 |
|
Senior User
Join Date: Mar 2003
Status:
Offline
|
|
just starting to learn this was wondering how/where do i code and compile the c++ on a mac?
thanks for any help
|

MacbookPro dual 2Ghz 1GB Ram 128 Graphics
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 1999
Location: Plainview, NY
Status:
Offline
|
|
Originally posted by billybob128:
just starting to learn this was wondering how/where do i code and compile the c++ on a mac?
thanks for any help
XCode. /Developer/Applications
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2003
Status:
Offline
|
|
ok thanks but that looks well hard to use any tutorials on the internet or anywhere?
|

MacbookPro dual 2Ghz 1GB Ram 128 Graphics
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
XCode is very simple to use. There's some online help, as well as on Apple's web site.
Or you could just do it the same way it's done on other unix systems. Ie, type up the code in a text editor, and use GCC to compile and build it.
I prefer XCode :-)
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Dec 2003
Status:
Offline
|
|
If you're coming from a command-line development environment, rather than Visual C++ or something, try the Terminal app (in /Applications/Utilities) to get a command line, and use GCC, which I believe comes pre-installed.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by billybob128:
just starting to learn this was wondering how/where do i code and compile the c++ on a mac?
You don't elaborate on your programming experience, but C++ is not a good choice for a beginning programmer. Not at all. C++ is really a good choice for someone who knows C and an object-oriented (OO) programming language like Java or Python, and wants a high-performance language that maintains the OO paradigm. C++ doesn't enforce good OO constructs, so it's important to understand OO before you learn C++.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Oct 2003
Status:
Offline
|
|
Open the Terminal app, write your main.cpp file, then compile it with
g++ main.cpp
For example,
----------snip---------------
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << "hello world!" << endl;
return 0;
}
---------snip---------------
after compiling with 'g++ main.cpp', run it by typing
./a.out
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2003
Status:
Offline
|
|
no background at all but im learning the c language from www.vtc.com quite easy but their player pragramm is crap really slow andit keep crashing with the bug report. oh well i can do hello world and age variables in xcode so ill stick with that.
thanks for all your input
|

MacbookPro dual 2Ghz 1GB Ram 128 Graphics
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|