C++ Basic Syntax
Basic Syntax
The basic computer programming, try to break up the following basic syntax of c plus plus:
#include <iostream>
using namespace std;
int main(){
cout << "Hello World!";
return 0;
}
The parts of the program:
- #include <iostream>
is the header where this program needed. Otherwise, the C++ programming language defines many headers, which contain information that is either Important or useful to your program. using namespace std; tells the program compiler to use the line namespace std; Namespaces are a recent connection to the addition of C++. //main() is where the program starts execution. int main() is the main function where the program starts execution. cout << "Hello World!"; bring the message 'Hello World!' to display on the device's screen. and return 0; is to terminate the main() function and return the value 0 to the calling process.
Comments
Post a Comment