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

ChronoYu

macrumors member
Original poster
Dec 21, 2007
56
0
Hi, I'm starting on a course in university for computer programming and so on, and I require the use of Microsoft Visual C++ on windows.
Is there a version of this C++ program for Mac as well? And/or does Mac have it's own C++ program? Would it be the same as the one on Windows? As in, will there be any major differences that might cause problems when I compare what I have done in Windows and in class?
 
at Uni i study C and just use a text editor to write the code (i use TextWrangler) and use gcc in Terminal to compile the code i.e. gcc -ansi -pedantic foo.c

im not sure about C++ but you should just be able to compile using gcc or use XCode which is on your Mac's install DVD
 
there are c++ compilers that will work on macs, in fact i'd be surprised if xcode diesn't have one built in which means that you'll already have it with you mac osx installation disc.

the language of c++ itself should be the same across all different versions, however, the is actually very very little to c++ and much of what you do depends on the libraries being used. the common ones you tend to start using will probably be there stdio.h etc, but the point of microsoft visual programming languages is that they focus on using microsoft's libraries for windows, so as soon as you are doing anything with their specific stuff it won't be mac compatible anymore. bootcamp or parallels will be your friend here.
 
If it is an introductionary course to C++, it is unlikely that it will require MS Visual C++ (i.e., that it will use Microsoft-specific libraries). You will probably be able to do all your assignments just fine in Xcode using GCC to compile your C++ code.
 
I took a C course last semester and even though it's pretty easy to write a command line tool and compile it through the terminal, the advantages Xcode provides make it a viable alternative. Once you open Xcode, you'll see how complicated it is and how it's just too much, but all you have to do is open a project and from the project manager screen look for "Command-line utility". THis will create a .cpp file and a "target file". Now you just write your code in the .c file, and hit cmd + r then shift + cmd + r and you get a shell like window of the program running. Now this is just for basic command line tools, but the advantage I was talking about is basically that the xcode text editor is pretty good, and you also get familiar with xcode for when you actually need a a program like that for more advanced stuff. Hope that helps(coming from a newbie).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.