Complete Newb Question

Joined
May 11, 2011
Messages
4
Reaction score
0
Points
1
Hello. I'm very thankful that i found this site, looks like a great resource.

Im new to Apple and Macs. Bought my first MacBook Pro a week ago, for purposes of learning development, I'll be going to school for Comp Sci in the fall.

My question is about learning C++. Before i got my Mac I started witha C++ tutorial website on my old Windows laptop and i used BloodShed Dev's IDE to learn C++ programing. Using Dev, after I wrote a program, it would compile and save it as an .exe file so I could just double click it on my laptop and see the "Hello World" pop up on my screen.

When I write the Hello Word on Xcode, it tells me it builds successfully, but I still don't know if A.) Is it supposed to pop up in a new window like it did on my old PC and B.) Can I make it so it does save my program into an .exe file that i can save on a thumbdrive and then take to a PC and run?

By the content of my questions you can see how extremely newb I am at this, and I look forward to learning a lot here.

Thank you much!
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Xcode will compile an OS X binary which will only run on OS X. Files with an exe extension only run on Windows.

The binary that is built with Xcode will be in the build/Debug or build/Release folder depending whether or not you've set Xcode to build a Debug or Release build.
 
OP
O
Joined
May 11, 2011
Messages
4
Reaction score
0
Points
1
Thats what I figured. The reason I'm concerned about this is I need to figure out what to do if when I'm taking my C++ course. Say for example, if i am assigned a homework assignment to write such and such program and upload it to the instructor, am I going to have to convert what I write through XCode into something that is Windows readable in order to submit it to the instructor? I'm pretty sure I'll be in the minority using a Mac for that course so I want to know what adjustments I'll have to make.

Thanks for the quick reply!
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I'm sure your prof is going to want to see the source. They're going to be assessing your source, not the binary. If need be, they can compile it.

Ask them when you meet them if everything is going to be fine with using a Mac. Better to be safe than sorry. Worst case - you install Windows through Boot Camp.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top