C++ Program


Before starting the abcd of C++ language, you need to learn how to write, compile and run the first C++ program.
To write the first C++ program, open the C++ console and write the following code

#include<iostream.h> includes the standard input output library functions. It provides cin and cout methods for reading from input and writing to output respectively.
#include includes the console input output library functions. The getch() function is defined in conio.h file.
void main() The main() function is the entry point of every program in C++ language. The void keyword specifies that it returns no value.
cout << "Welcome to C++ Programming." is used to print the data "Welcome to C++ Programming." on the console.
getch() The getch() function asks for a single character. Until you press any key, it blocks the screen.

Post a Comment

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();