New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Dumb it Down a little for me please!

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jul 22, 2008
Posts: 59
insinkerator is an unknown at this point

insinkerator is offline
Ok so here is my story. I am using the older model iMac G5 all in screen thing and am currently running leopard 10.5.2. Im not too sure if this is relevant but you never know!!

When it comes to computer programming i am a complete noob. I havent a clue what i am doing! So im trying to learn C++. Can you help?

I downloaded a tutorial that works through the compiler "bloodshed" but i am using Xcode 3.1 and this is where my problem is. So i open up Xcode. File > New Project > Carbon C++ Standard Application...

There is an attached picture of the window i am looking at. So i click on main.cp thinking that would make the most sense. And i get this

// main.cpp
// Untitled
// Created by Killian O'Connell on 06/08/2008.
// Copyright Carrigaline Community School 2008. All rights reserved.

#include <Carbon/Carbon.h>
#include "TApplication.h"
#include "TWindow.h"

// Our custom application class
class CarbonApp : public TApplication

CarbonApp() {}
virtual ~CarbonApp() {}

virtual Boolean HandleCommand( const HICommandExtended& inCommand );

// Our main window class
class MainWindow : public TWindow
MainWindow() : TWindow( CFSTR("MainWindow") ) {}
virtual ~MainWindow() {}

static void Create();

virtual Boolean HandleCommand( const HICommandExtended& inCommand );

int main(int argc, char* argv[])
CarbonApp app;

// Create a new window. A full-fledged application would do this from an AppleEvent handler
// for kAEOpenApplication.

return 0;

CarbonApp::HandleCommand( const HICommandExtended& inCommand )
switch ( inCommand.commandID )
case kHICommandNew:
return true;

// Add your own command-handling cases here

return false;

MainWindow* wind = new MainWindow();

// Position new windows in a staggered arrangement on the main screen
RepositionWindow( *wind, NULL, kWindowCascadeOnMainScreen );

// The window was created hidden, so show it

MainWindow::HandleCommand( const HICommandExtended& inCommand )
switch ( inCommand.commandID )
// Add your own command-handling cases here

return false;

now where the **** am i supposed to start writing code? Also I have no clue about any terminology so speak to me as if im like a 3 year old kid and i might understand you
QUOTE Thanks

Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 901
Del has a spectacular aura about
Mac Specs: Mac Pro 2xQuad core 2.8GHZ

Del is offline
From what I can gather most development on the Mac in XCode is done in a language called objective C. There is a beginners tutorial here

Other info here
QUOTE Thanks

xstep's Avatar
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
As you are a new comer to programming, I suggest you start with a scripting language such as PHP or Perl. Realbasic may be an alternative too. My thinking is that you want to keep the environment simple so that you can concentrate on learning the technical basics and thought processes behind programming. This will give grounding for the concepts you'll need to do more complicated projects.

If your goal is to do Mac programming, then you need to ignore C++ and Carbon too. Del linked to a great site but even that may assume some programming experience.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks

Member Since: May 07, 2008
Posts: 73
Andre is on a distinguished road
Mac Specs: 15" MBP 2.4GHz, 4GB RAM, 7200RPM 200GB

Andre is offline
I am a computer science student, so I have done some programming in the past. My main language was C and C++. This summer, I decided I wanted to take the plunge to Mac, so I bought my first MBP and started to learn what "coding for Mac" would mean.
Depending on what you are doing, I highly doubt that you want to create a Carbon application. I would highly recommend you learn a little bit of C (specifically: variables, loops, functions, and pointers) and then move on to learn Objective-C and Cocoa. C++ is ok if you only use a small subset of the functionality, but after a while using it, it gets ridiculously complicated, and it's messy. Also, Objective-C is what makes a Mac a Mac. Mail and Safari were written in Objective-C, and more and more applications will be dropping Carbon in the next couple years.
If you are really serious about learning to code for Mac, may I recommend you get the book Cocoa Programming for Mac OS X (3rd edition). I think you can probably get an e-book of it, but I'm not sure, since I bought my copy only days after it was released.
QUOTE Thanks

Post Reply New Thread Subscribe

« Accessing Wikipedia articles (feed?) in Cocoa | Need help with advanced Objective-C and NSComboBox »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Dumb mac newbie question lemurguy Switcher Hangout 4 03-07-2008 12:27 AM
A Hello And A Dumb Question Brian. Switcher Hangout 14 04-03-2007 04:05 PM
A few (probably dumb) questions from a new Mac user cindy Switcher Hangout 8 05-16-2005 08:51 AM
I Might Sound Dumb But Does Tiger Come With I Life O5?? adamxj2 OS X - Operating System 1 04-14-2005 12:19 PM
newbie help (dumb terminal settings?) CaptainMack OS X - Development and Darwin 10 02-17-2004 07:25 PM

All times are GMT -4. The time now is 02:22 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?