How to Write C++ on Mac? [Closed]

Taking my first C++ class in college. I need to download C++ and my teacher gave us a direct link to download it, but it only works on Windows. Is there a way I can format it to work on my Mac or is there a Mac-friendly version I can download?

4

A compiler for C++ is already built into Mac (try g++ main.cpp in terminal). If you mean an IDE for C++, use Xcode 5, available in app store.

It's developed by Apple, has git integration too if that's useful to you. Also has templates and such available to entice you to work on OS X/iOS projects, which might be a nice way in for you (I'm just starting out too, and I think that could be good).

For command-line projects though, I find it best to write in Xcode, then compile and run from the terminal. It's easier for file I/O and passing arguments to stdin IMO.

You can utilize something called Xcode IDE to write your programs on C++, I have been using that for a quite a while now, and it's definitely fun. You can find the app from free on APP store or just by clicking the link below. This is one of the many things I like about MAC.

click here to get XCODE

On Mac, since you are just starting out, use XCode. Its a pretty neat IDE with built in C++ compiler so you can write C++, compile with a click and run.

I think you kinda have the wrong idea of c++. C++ is a programming language and what you are asking about is a development environment. For example Xcode is such an environment. Since I also have my favorite I would use Eclipse since it is useful for many other purposes too.

Eclipse C++ Download

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest