Hello!! buddies, This is my second post regarding C programming. Today Let us learn how to run C Program in Visual Studio 2010.
I took each and every step screenshot so you won’t have any doubt.
First click on file
Now go to new> project
Now select Visual C++>Go to Win 32 Console and enter your file name
Now this dialogue box will appear,click on next.
Choose Console Application and select Empty Project and click on Finish
Now It will appear like this, so now see in right. You Can see ‘Source File’
Right Click on source file>Add>New Item
Select C++ File(.cpp) and Enter the file name
After doing this click on add
This is the coding Window
Write your Code
Now for building and compiling it, press ‘Ctrl + F5’
It will look like this click on ‘Yes’
Now you can run your first program
It is pretty easy, right?
Now for creating the second file, you don’t have to do all the above steps.
Just follow few steps:
Right click on existing file ‘HelloWorld’> go to properties
See the Excluded from build option and now choose ‘Yes’.
Always remember that if you want to create another file then previous files should be Excluded from the build. If the Excluded from the build is ‘No’ then while running another program it will show error.
For creating another file you just have to follow right click source file>Add>New items
View the images properly it shows the each and every step:
Today, we just saw how to run C program in visual studio 2010. The code will be explained in next post. This session is all about knowing to use visual studio to run C Program.
Any doubts? comment below. Hurray! Finally you learnt it.