Setting Up A Project

6 minutes
Share the link to this page
Copied
  Completed
Learn how to setup C++ on the following platforms: Mac OS X using Xcode Windows using Visual Studio

Transcript

Hello, welcome to the second tutorial in the c++ programming series and in this section we're going to be looking at how to set up a project. We're going to show you how to set up a project on Mac and also on Windows. So you can do whichever will be using Mac from here on out in all the tutorial but it's essentially saying once you've got it set up, so what you need to do is actually there's several ways you can do it to where we're going to do and we recommend is download Xcode can just download it off the App Store for free. And then once you download the Xcode and Xcode, Xcode, Xcode and you've installed it and you've set it up, next thing you want to do is just open it up, click Create new Xcode project. It's going to create a simple command line tool to learn c++.

Select your language type is c++ and then put your product name was going to put c plus plus to tour the Reno it Print plus plus it here. If you put plus plus, I can show you, you get minus minus here so so what's not putting in words, click next everyone was gonna bring that desktop. And then that they that we're sorry about that. And then we've got our main CPP, and we've got our prices, we just run this in a scary console that just says hello, world. And let's just quickly go over what this does. So first nine hashing query the quarterly preprocessor.

To include the contents of all your strings basically just includes the contents of this file here, or wherever it is included. Main is the entry point of the application and we turn that into value which is usually zero. Okay, here, we can make something else which can be used for debugging purposes, or say is argument count, and is the number of arguments being passed into your program from the command line. arg V, the ultimate vector aka the array of arguments. The C out is accessing the CO method called STD. Con CF is accessing this co method from the std namespace within the which is stands for standard name ACM is console out there less text to be printed in the console that we'll be covering that in the next tutorial as well.

So yeah, that is it for setting up on Xcode. And that's just a quick run through of what the code does by default. So to running on Windows, I want to show you now what you want to do. I was going to maximize this to the right resolution. That's February versions of Visual Studio, you can easily just do five For the night we're using the latest 120 13 and we use an express which is for free you want to Window version I hear desktop not Windows Phone or Windows Metro or the modern interface and the whole net on the flow did you want to start a new project by clicking the orders going file once the uploads slow down okay File, New Project and then you want to go to my bad I have loaded the wrong Visual Studio. That was my fault.

So I will load the correct one this one pretty quick Yep, this is the one my bad for Windows desktop. Anyone who has gone console application, what's going to call this C plus plus tutorial. Desktop click OK. Then for this is going to keep it simple. The properties of our application, it's going to keep empty project we can get rid of SDL nations content application, click Finish. What we're going to do is just add that cpp file that we've had in Xcode by default as well. So it's not like new item.

Campaigned on calling main you can call it whatever you want. I'll call it main two Crude oil stream then we're going to put in main don't actually have to put the arguments inside the generally we'll never use the arguments in all my years of programming c++ never used the parameter they'll go into Maine so you don't have to actually plan that. I'm going to put return zero but before that it's time to see it also STD C will STD colon colon and line semicolon on and after you run this it will appear. Something interesting will happen. It disappeared. He's waiting stop days to system cool Now if we want it to stay down then we can just close the application by clicking that it will provide source code for the Xcode project and the window project but as we said we will just be working on Xcode but it's general transferable skills off if you have any questions feel free to message us at support at Solar System Cody UK.

The email will be in the description you can comment on these videos directly messages via YouTube, whatever you feel comfortable with, looks at all the coiling for source code will be in the description. As usual. Thanks for watching and I hope you have a nice day.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.