Visual Studio IDE for C++
We all been passionate about C++ right? Some uses different sort of code editors, compiler or IDE.
So….what’s Visual Studio Enterprise, Community and Professional. Uhh…here we also push up with Visual Studio Code.
Puzzled? That’s why we here for. To understand this, we have to just look into the difference between a Code Editor and IDE.
In a very summarized way, Code Editor just like a notepad but with some rich features which helps us to run code and sometimes debug. On the other hand, IDE which stands for Integrated Development Enivorment is a type of software which certainly helps you to code in a single platform providing all the frameworks at a time making you to code fast.
So we’re done, Visual Studio Code is a code editor and the family of Visual Studio IDE which contains Community, Professional and Enterprise Versions are IDE.
Well we can use any compiler to run a C++ code however for programming purpose, one should develop an eviroment for programming which provides constant rich features such as Hot Reloading for C++, CI/CD Pipeline using GitHub Actions and IntelliCode(type less, code more).
So well, Visual Studio IDE certainly provides all these things and in fact more above than this.
Till here, I believe you all must have understood the basics.
Let’s setup the Visual Studio IDE
- Let us download the setup and let the installation begin. Go to https://visualstudio.microsoft.com/downloads/ for downloading.
2. Now, simply download the Community Version of it reason being we have to pay quite a certain for Professional and Enterprise Version. Community version still contains a lot of features to accelerate.
3. Just execute your installer and what you will get is the Package Installation Window. So go for Desktop Development with C++. It will show you the required files to be downloaded and installed.
Don’t worry, required space is quite high but for C++ mainly we do require dependencies to be installed. Here you can look out that Windows 10 SDK will be installed which helps us to develop software and also frameworks.
CMake is just a certain tool being used for C/C++ for managing building the source code.
4. You can now open your Visual Studio Community. Just search in the Search bar as Visual Studio and you will get it.
5. You will be prompted for the screen where you will be asked for creating your new project or opening an existing one.
6. As of now, we should be creating a new and empty C++ project for understand the working of it.
7. Suddenly we have to also configure our new project and let’s have a quick glance over it.
Here, the name of the Project is HappyNewYear where as there is a solution name also. So what’s now? It just a folder which will contain the related projects to HappyNewYear.
8. Make sure you sign in as it will helps you to sync your settings and previously used data to make yourself comfortable fast.
Signed In :
9. Now we have to create a .cpp file which will carry our code. So just select Source File option and right click over it.
10. Creating a new item that will be our .cpp file
11. Just with C++(.cpp file) and click Add.
12. Let us write some code and build it using the Visual Studio. You can select the option Start Without Debugging or Simply hit Ctrl + F5.
13. GOTCHA ! The Output is here on the Console Window.
Easy Now? Yes it is now. Just maintain the proper solution name carrying your all the projects and just code throughout the IDE and build it using the internal builder.
Some of the references that can help you with learning :
- Download your IDE from here : https://visualstudio.microsoft.com/downloads/
2. Learn C++/C from the valuable docs.
3. Learn more about CMake: https://cmake.org/cmake/help/latest/index.html
4. You can also get into Visual Studio Code.