Using Xcode for Visual Studio C++ assignments

I am in a C++ programming class at my school. My professor wants us to use Visual Studio for all our console applications. I have a Mac at home and would like to use Xcode. I would like to know if there is a way when I submit my assignment, my professor can open it using Visual Studio and it will work. I tried emailing the code to my friend who has Visual Studio, but the closest we could get was opening the .cpp file, which was read only. Any insight would be appreciated.

Posted on May 23, 2013 12:30 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 29, 2017 4:51 AM

get a legal copy of windows and then download Virtualbox for free. Then install windows in a virtual environment, then download and install VS in the virtual environment.


You can also try mingw-gcc to cross compile on the mac to windows but I think your best option is a virtual environment

9 replies

Sep 29, 2017 5:16 AM in response to marko.stankovic

I remember many years go at the University I had the same problem and at that time Xcode was still not existing but I was using Project Builder 🙂

Anyway, depending on the complexity of console app a little effort is always required and remember that VS is not the most close implementation of the C++ "standard". Maybe posting a (little) full working VC++ code on year can give us a better chance to understand the nature of you problem.

Sep 29, 2017 5:07 AM in response to Wayne Contello

I got legal copy of windows and i do have license for VMware but, problem is that i dont want to open virtual machine on my mac , as it slows him down quite a bit. So i dont like that solution, also Visual Studio in virtual machine works slow. I got macbook pro 13"2015 256GB SSD. I wanted to make my c++ small programs in Xcode but i cant belive that there is so huge diference in standard 😟

May 23, 2013 12:56 PM in response to g_wolfman

conio.h is nothing special. It would be a little extra work to port that to curses. Hopefully, neither conio.h nor MFC/.NET will be used. If it is a C++ class, it should use C++ I/O that will be more or less the same across all operating systems.


I know that using Apple's Clang compiler and its advanced error messages would give a student a definite edge over anyone using GCC. I haven't used VC++ recently enough to know what it looks like.

May 23, 2013 5:34 PM in response to etresoft

etresoft wrote:


Hopefully, neither conio.h nor MFC/.NET will be used. If it is a C++ class, it should use C++ I/O that will be more or less the same across all operating systems.

Should is the operative word here...some courses that I've seen syllbi for are fantastic in regards to being fully cross-platform (the courses at Stanford, for example). Others are not only single-platform, but single-compiler because their code relies on non-spec compiler hacks.


No idea where on that spectrum the OP's course lies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Using Xcode for Visual Studio C++ assignments

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.