Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ajakson

macrumors newbie
Original poster
Feb 20, 2007
2
0
Somewhere
I am a junior in high school who loved programming BASIC and VB on pc. I have recently been converted to the Mac cult :D and want to get some info on where to start programming. for free or very little monetary commitment.
i am very interested in getting a jump into c or c++ :eek: . any suggestions would be great.

what is a good book/tutorial to c++?
what is a good free compiler?
anything Mac and programming related would be helpful.

thx so much.:)

ps.
i have an iMac 20".
 

bronxbomber92

macrumors regular
Nov 23, 2006
109
0
What is your aim? Game? Application? Other?

Depending on what your goal is, we can't really suggest a suitable language.

But, even though it sounds like you wish to learn a C syntax based language, you could try RealBasic, if you want to stick with your BASIC syntax. ;)
 

bronxbomber92

macrumors regular
Nov 23, 2006
109
0
Don't you have to use Objective-C with XCode? And isn't Objective-C very different syntax-wise from other C languages?

You can use any language (or most popular languages) with Xcode. C, C++, Objective-C, Ruby, Python, Java, C# (when adding syntax coloring), and many many more. Xcode is more custom taylored to work with Cocoa and Objective-C though.

To give a very brief and, general idea of what each language is typically used for:

• Cocoa & Objective-C(or some other language via a bridge like PyObjc) - Applications

• C, C++ - Games

• Java - Anything, but there are disadvantages and advantages (there was a huge thread about Java recently here).


Don't think you have to follow this at all. Many people use Cocoa & ObjC for games, and C/C++ for Applications (probably via Carbon, wxWidegts or GTK). Just in general this is how I people do things (and how I do also).
 

supermario19

macrumors member
Aug 17, 2006
36
0
hey so were exactly do i download xcode from? i signed up for adc, but I can only find xcode tools and plug ins
 

slooksterPSV

macrumors 68040
Apr 17, 2004
3,543
305
Nowheresville
Personally, depending on what you want to develop there are many different items you can use:
SDL with Cocoa for games
SDL with C++ for games
Cocoa for apps
Carbon for apps
Java for basically anything (with drawbacks of course (speed being an issue))
--I know this was stated already.
I usually use SDL and C++ for games, I started to develop one, but soon it became too complex for one person to work on (an RPG).
Now I use Objective-C & Cocoa to build my applications. Once you get the hang of Objective-C you can use CoreData to help create your applications fast and basically effortlessly. To be honest, I would recommend you figure out how this code executes, its where you'll start from in any beginner programming book.

PHP:
#include <iostream>

using namespace std; //used so we don't have to put std::cout <<

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

semaja2

macrumors 6502a
Dec 12, 2005
576
18
Adelaide
I have a great pdf file about using xcode and learning the c languages, from a quick skim reading it looked like a good resource.
PM me your email and ill send it to you (about 4 mb)
 

mags631

Guest
Mar 6, 2007
622
0
If your goal is simply to expand your knowledge about programming, then any modern language will do. For no additional investment, you can follow the tutorials provided by Apple on Cocoa (Objective C). The end result will be a fully functioning application that you can continue to tweak as you learn more about the language and its run-time environment.

If you can access this link, Apple provides an overview on how to get started.
http://developer.apple.com/referencelibrary/GettingStarted/GS_Cocoa/index.html
 

irbdavid

macrumors regular
Mar 27, 2006
154
0
Good books on programming topics = Anything by O'Reilly

"C/C++/Java/etc in a nutshell" make good reference books, and their "cookbooks / practical programming ones" make a good place to start a language, I find. Depends how you learn best though, whether you dive straight in or follow instructions :D
 

Spike099

macrumors regular
Feb 18, 2007
143
0
Canada
Xcode Tools is also available on your OS X install disk 1. Obviously might not be the most recent version but can save you the large download.
 

NickFalk

macrumors 6502
Jun 9, 2004
347
1
Another basic...

I have a slightly different tip for you as you state you used to enjoy programming in basic. Blitzmax is a modern basic-dialect modular OOP-based and supports Open-GL.

This way you can use your knowledge of basic-syntax, get used to the "modern" (it origins lays in the 60's) concept of OOP - which is jas-droppingly effective and a real eye-opener when you first manage to wrap your brain around it. (At least that's how I felt).

You can download a 30-days demo at http://www.blitzbasic.com (full version $80). After 30 days you either have to pony up the dough or you can go elsewhere, at least you will have had the chance to get into the OOP-side of things without having to learn a brand new (and more abstract) syntax to boot. When you understand the principles it'll probably be easier to dive into that whole C, C++, Objective-C pool...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.