Skip to main content

Posts

Showing posts from February, 2020

Introduction to C++ - Part 1 Writing a simple program

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: https://tutorials.visualstudio.com/cpp-console/create.html 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 mai