Installing Visual Studio Community Edition
Where to download visual studio community edition
You can download Visual studio from https://www.visualstudio.com/. For community edition, go to https://www.visualstudio.com/free-developer-offers/. I will be using community edition for this blog. Click download under Visual Studio Community.Follow the steps givcn in the link below:
https://tutorials.visualstudio.com/cpp-console/install.html
Writing your first program in C++
Follow the steps givcn in the link below:
Then, modify the code as shown below:
# include <iostream>
using namespace std;
int main()
{
cout << "This is my first C plus plus program";
return 0;
}
Explanation of code
Line 1 of the code instructs preprocessor to includes input/output stream header file in the program.Line 2 instructs to look at a the namespace std which has iostream file
Line 4 start of main function. This is the entry point into the c++ program. Note that in line 5 the function body starts with a { and it ends in line 8 with a }. Within the main functions's body block all statements ends with a semicolon ";" .
In Line 6 cout, pronounced "see out", sends the message to the standard output or computer screen.
Link
https://tutorials.visualstudio.com/cpp-console/intro.html
https://tutorials.visualstudio.com/cpp-console/intro.html
Comments
Post a Comment