# C++ compiler (xcode 3.0) - help wanted!



## danuradityo (Apr 21, 2008)

Hi, I've been learning C++ by using microsoft visual studios for few months now, but since I'm using a mac (well I'm a newbie), I couldn't find any program that can compile the C++ in Mac.

Well now I'm using the xcode 3.0 for now, but I can't build and execute the file, like the one you can execute in windows computer. Any helps please?

Or maybe you can propose alternative softwares?

Thanks for your help.


----------



## barhar (Apr 21, 2008)

'... but I can't build and execute the file ...' - provide the code (you currently have working in 'Microsoft Visual Studio').


----------



## MisterMe (Apr 21, 2008)

danuradityo said:


> Hi, I've been learning C++ by using microsoft visual studios for few months now, but since I'm using a mac (well I'm a newbie), ...


Well, if your *Visual Studio* C++ code makes calls to Windows APIs, then there is no way that it can be compiled using *Xcode*. MacOS X has a different set of APIs. The only programs that can be compiled on both platforms are those that make no calls to OS-specific routines. Such programs would run from the *Terminal*, accept data from the keyboard, and output to the *Terminal* window.


----------



## artov (Apr 22, 2008)

If you need to program using C++, I cannot help. But, if you like to program using C family language both in Windows and OS X, you might like to check Java or C#. For C# you need to install Mono http://www.mono-project.com/Main_Page.


----------



## Viro (Apr 22, 2008)

artov said:


> But, if you like to program using C family language both in Windows and OS X, you might like to check Java or C#.



Or you could just use C.


----------

