Tuesday, July 28, 2009

Help with C++ on a Mac for someone learning to program?

OK, in my computer class we learned a little C programming (and by little i mean little) and I thought that I may want to work with programming as a possible career. I'm looking to learn C++, but I have a Mac, and I have absolutely no idea what I am doing. Do you have to install the language itself? Where can I find a good compiler? I've tried to do my research, but I don't understand most of what people are talking about (they start going on about Xcode and I get completely lost). Can someone please explain to someone who has basically never programmed before how to be able to write and compile C++ so I can learn? I was told that C++ is the best to learn first and everything else would come easier (or else I could've started with Java - my text editor, TextMate [which I use for all my XHTML and XML projects] won't compile C++).





I guess I do have a little programming knowledge since I learned a decent amount of XML, but its not even close to C++.





Thanks.

Help with C++ on a Mac for someone learning to program?
Computer languages themselves are not products or pieces of software that you install on your computer. That is why you won't find information on how to "install c++" on your computer. What you install is usually called a "development environment". This usually includes the following pieces of software:





compiler: a compiler understands the computer language that you type, like C++. It turns that code into machine code that your hardware can run.





linker: this piece assembles output from the compiler and puts them all together to build an application.





debugger: this piece of software lets you step through your code line by line as it runs so you can see what the code is doing and find problems (bugs)





So to answer your question you need to install XCode which is a developer environment that can compile both C and C++ code.





Here are steps for downloading and installing XCode:


http://www.macworld.com/weblogs/macosxhi...
Reply:http://developer.apple.com/tools/xcode/


No comments:

Post a Comment