C++ on Mac OSX
I have searched "mac" in every search box I have seen on cprogramming.com but no results.
I have Mac OSX 10.6.8 and I want to start programming in C++. I have done some research but since I am new to Mac its very unfamiliar to me.
I have a few questions:
1. How do I get started in C++ (or even C) on the Mac? Stable, reliable compilers?
2. Do I need XCode? I have access to XCode 4.1.1 if needed.
3. I have a book on C (0078823110 ISBN), but it says nothing about Mac, only Windows. Can I use that for the Mac? How much different will it be?
4. Do I have to learn Objective-C? Is that my only option?
5. Honestly, I would rather learn to program on a PC but I don't have one, it broke. If I learn C or C++ on a Mac will I have to learn anything new to compile on a PC? What will I need to learn?
I think maybe you guys get this gist of what I am asking. I'm a beginner programmer and want to learn C++ on a Mac. I need advice in getting setup and obtaining the correct "book" to learn from. Please be honest, give me your advice and opinions. Start me on the correct path to learning C++. Like I said, my PC is broke (for now!).
Standard C++ is machine-independent. If your book is about Windows programming, then it will be useless to you. If it is about C, then you are fine.
You need gcc, basically; XCode is a reasonable way to get it, I suppose.
My book says ANSI C, but I can see that it is for Windows users.
I take it no one on this board diggs Mac software, which explains the lack of responses/advice.
I thought Mac developers tended to use Objective-C rather than C++, but I'm not sure.
I think most people on these forums use a Linux and/or Windows environment, but you'll be able to find help with standard C++ programming, which is platform independent.
Unless you're interested in writing Cocoa (i.e., Mac GUI) apps (or other apps that require a framework, like OpenGL), then you pretend your Mac is a BSD box, because that's what it is. If you're writing standard C or C++ then it's not going to make a difference what machine you're on.