How to Show Output And Basic Syntax and Function:
In C++ (C Plus Plus), we need to include C++ Libraries then we start body parts. If we need to describe user define functions then we'll describe that between head and body.IOStreamThis library is used for (Input & Output Stream). Because we may need to use many input-output built-in functions within body parts.
int main()The main body starts here. You need to define your main executed code here.
Cout << "Welcome to Quality Written Codes.";Cout is used for output the value. We'll write output value within single or double quotes. It is like Echo Function in PHP
Note: Every line will be terminated with semi-colon ( ; ) is called "Terminator" as PHPThere are two ways to write comments within C++ Code.
#include <iostream> //C++ Library
#include <iostream> /*C++ Library */
- You can add comments with two slashes " // "
- You can also comment with "/* Quality Written Codes */" Asterisk Slash.
Note: These two methods are same as PHP comment systemHere you will know, How to pause system?
system("Pause");You need to use this function, where you need to pause system.
Return 0;It will null to 1st function or execute the function.
/*
Name: Show Output.
Copyright: Sameearticles.blogspot.com
Author: Samee Ullah Feroz
Date: 26/01/14 23:03
Description: Here you will learn C++ basic syntax and function
*/
#include <iostream> // C++ Library
int main()
{ //body starts from here
using namespace std; //It will call all standard functions of C++ before body
cout << "Welcome to Quality Written Codes.";
cout << endl; //It is used to break line
cout << "\tSupported by Samee Ullah Feroz." << endl; //it is an other method to break line.
// "\t" is used to add tab like in PHP language.
system("pause"); //It will help to stop this program
return 0; // It will end this function.
} //body ends here
Learn Its basics and ask the question about it.
Post a Comment
Give your reviews about this blog. Leave your comments. what do you think about this post?
Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe Samee Articles blog.
---------------------------------------
Thanks for visiting QWC.Me.
==========================================
For free guidelines contact me on SEO Expert | Samee Ullah Feroz is online there.
==========================================
Best Regards